The Inform parser doesn’t understand that “tin can in box” means the tin can that is in the box by default. The only one of those that is understood by default is “take can from box” and a few synonyms–and that involves the dreaded “[things inside]” token which has a truly incredible amount of parser code devoted to it, for just that one case.
To make “in” and “on” understood by default you have to add Understand lines for them, as discussed here:
Understand "in [something related by reversed containment]" as a thing.
Understand "on [something related by reversed support]" as a thing.
So the parser isn’t that powerful by default, but you can build in some extra power using understanding by relations.
But then, as discussed further down that thread, you get the problems with “put can in box on heap” (or even “put the can in the box,” which really is unambiguous to ordinary readers). The parser grabs as much of the command as it can for the initial noun phrase, leaving nothing left over for the preposition or second noun. So both those commands get processed as, effectively, “put can,” and the parser asks what you want to put the can in.