Yeah, sometimes you get a notion for a nifty magic object and then build up the story about it, but sometimes you go the other way 'round, and need a magic object for the characters to overcome some obstacle.
The first point is that you want the object to be either simple or subtle. If it's simple, it predictably does one and only one thing -- or perhaps a related handful -- but if your characters wish to us it outside its normal arena, they are really going to devise a crafty way to use it. Plot and characterwise, it's best to have the characters need to devise such a way if it's to solve the story problem, It also carries the fearful danger that it's going to go haywire, like the mill because of which the sea is salt. Subtle ones, on the other hand, can produce a wide variety of effects, but the danger is that the effects are not easy to reproduce, if, indeed, the effects are not driven by the object's having a mind of its own. What I disliked about Mercedes Lackey's sword Need is that it gives the woman who wields it what she needs, which is never, in any story, something that the character had to puzzle out why that was what she needed. Wildcard, from Tales of the Questor, was justly named for its wild and random effects. When he actually needed something, what it produced is useful -- you realize, eventually; face to face with cruel and blood-thirsty hunters, it produced basically a pink garland more suitable for a festivity, making the hunters laugh and gloat for crucial moments. When he tries to test it on a practice field, well, once it announced that at the sound of the tone, it would be exactly a given time, and it got it wrong.
The second thing is that there needs to be a metaphorical congruity between the object and the purpose. When unlocking things, use a key, not a sword, or a cup, or what have you. Swords are best for damaging things. Rings are subtler, because you can metaphorically put on, or take off, the power they grant. Invisibility cloaks envelop you. Boots travel and are suitable for any such magic, from seven league boots to ones that allow you to move with stealth.
Except for comic effect, of course. Incongruity between purpose and form is a great source of comedy.