Please use Question Tags to state the name and version of the Story Format you are using, as answers can vary based on this information. Because I don't know which story format you are using the following information will be general.
One way you could implement the functionality you require is to use a story variable to track the current location (eg. nowhere, current passage, the player) of all the relevant items in your story. You could then check that current location to determine things like:
a. If the item hasn't been "found" yet. (item location is "nowhere")
b. If the item is in the current room. (item location is "Library" and the player is in the "Library" passage)
c. If the item is being carried by the player. (item location is "player")
When the player searches the current room/passage the found item's location would change from "nowhere" to the name of the current passage, and when the player picks up an item located in the current room/passage then the item's location would change from the name of the current passage to "player".