From Minecraft Wiki
Collects all items within a one block from Agent in three dimensions.
collect <item: string>
- Fails if the arguments are not specified correctly or no items of the same name were collected.
- On success, returns if any items of the same name were collected.