Swap Inventory Slots
swapInventorySlotsSwap any two hotbar or inventory slots for a Minecraft entity or player by specifying the target, sections, and slot indices to reorganize items.
Instructions
Swap two inventory slots of one entity or player. section is "hotbar" (slots 0-8) or "inventory" (backpack, slots 0-26). Both slots may be in the same or different sections. The target is an entity UUID or a player name.
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": {
"target": "<target>",
"fromSection": "<fromSection>",
"fromSlot": "<fromSlot>",
"toSection": "<toSection>",
"toSlot": "<toSlot>"
},
"name": "swapInventorySlots"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Entity UUID or player name (player names are case-insensitive) | |
| toSlot | Yes | Second slot index (hotbar 0-8, backpack 0-26) | |
| fromSlot | Yes | First slot index (hotbar 0-8, backpack 0-26) | |
| toSection | Yes | "hotbar" or "inventory" for the second slot | |
| fromSection | Yes | "hotbar" or "inventory" for the first slot |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | ||
| hotbar | Yes | ||
| toSlot | Yes | ||
| fromSlot | Yes | ||
| inventory | Yes | ||
| toSection | Yes | ||
| usedSlots | Yes | ||
| hotbarUsed | Yes | ||
| previousTo | Yes | ||
| totalSlots | Yes | ||
| fromSection | Yes | ||
| previousFrom | Yes | ||
| inventoryUsed | Yes |