Source: Player's Handbook
1st-level divination (ritual)
Casting Time: 1 minute
Components: V, S, M (a pearl worth at least 100 gp and an owl feather)
You choose one object that you must touch throughout the casting of the spell. If it is a magic item or some other magic-imbued object, you learn its properties and how to use them, whether it requires attunement to use, and how many charges it has, if any. You learn whether any spells are affecting the item and what they are. If the item was created by a spell, you learn which spell created it.
If you instead touch a creature throughout the casting, you learn what spells, if any, are currently affecting it.