Does a Glyph of Warding have its own agency or a limited omniscience in the game?
The case of the nasty Drow, invisible evil Sprite and the blue Orc.
Some specifications for the trigger of a Glyph of Warding are more obvious than others. For instance, I am a Dwarf Cleric and set a Glyph of Warding (Explosive Runes) underground to be triggered by the next Drow that walks past my favourite stalagmite. It is simple: I can see under ground because of my Darkvision; I know what a Drow is. Therefore the Glyph of Warding's trigger is something that I could potentially see and/or know.
Now, what happens when I set the trigger to be an invisible evil Sprite? I can't normally see these creatures. So, in this case does the Glyph of Warding still trigger when an "invisible evil Sprite" passes by and "Kaboom! Bye-bye evil Sprite!". Also, how can it know that Sprite is evil, when I don't even know that?
Then there is this situation: I am a completely colour-blind and my mission is to capture the blue Orc without breaking my cover, by say asking every punter a stupid question like: "Have you seen a blue Orc around these parts, me matey?!" So, I come up with a plan. I use a Glyph of Warding on a bridge which most of the village use on a regular basis. The trigger is: when a blue orc walks over the slab of stone, cast Light. I lie in waiting, watching out for my Light cantrip to trigger. Once I spot the blue Orc, I will follow her/him and plan the capture.
So Orc-ward...!
There is a deeper question at the heart of my question in that Glyph of Warding appears to have its own sense of agency in the game. The magic cast, that recognises the specific conditions for a trigger, appears to be observant and have possibly a omniscience limited to its immediate surroudings.
So, does a Glyph of Warding have its own agency or a limited omniscience in the game?
Glyph of Warding
You decide what triggers the glyph when you cast the spell. [...]
You can further refine the trigger so the spell activates only under certain circumstances or according to physical characteristics (such as height or weight), creature kind (for example, the ward could be set to affect aberrations or drow), or alignment. You can also set conditions for creatures that don’t trigger the glyph, such as those who say a certain password.
When you inscribe the glyph, choose explosive runes or a spell glyph.