Good idea, although unless I'm missing something that won't work.
You pass the server a slot ID, and it takes the item from that slot - you don't pass it an item ID. If the slot is empty, it returns with nothing (and no cash), and I haven't yet found a way to get the server to think you have an...