Give, take, or clear items
edit_itemsGive, set, take, or clear items in a player's inventory or ender chest, or in container blocks, to manage what is stored where.
Instructions
Change what a player's inventory or ender chest holds (players:write; The player must be online; otherwise the error is player_offline.), or a chest, barrel, or other container block (world:write). Give either player (and container) or block. give adds an item where it fits: a player's overflow drops at their feet, a block's is lost and counted in dropped. set puts an item in a slot, replacing what was there. take removes amount items from a slot and says what it took. clear_slot empties one slot; clear empties everything, a player's armor and offhand included. Cleared and taken items are gone. Inventory slots: 0–8 hotbar, 9–35 main, 36 boots, 37 leggings, 38 chestplate, 39 helmet, 40 offhand. Ender chest slots: 0–26. A container's slots count from 0; a double chest has 54, the left half first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "edit_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | For give and set | |
| slot | No | For set, take, and clear_slot | |
| block | No | A container block instead of a player | |
| action | Yes | What to do | |
| amount | No | For take: how many; the whole stack when left out | |
| player | No | Player name or UUID | |
| container | No | For a player | inventory |