A Staff of the Magi can absorb a spell targeted only at its wearer, gaining back a number of charges equivalent to the absorbed spell's level.
Cantrips are spells. In some occasions, like for the sorcerer's Twinned metamagic option, they are considered alevel 1 spells:
When you cast a spell that targets only one creature and doesn't have a range of self, you can spend a number of sorcery points equal to the spell's level to target a second creature in range with the same spell (1 sorcery point if the spell is a cantrip).
Said clause is not present in the Staff of the Magi's description, but can we assume that an absorbed cantrip would give back 1 charge to the Staff, or should it be 0 charges instead?