Clear Inventory
clearInventoryRemove all items from an entity's or player's 9 hotbar and 27 backpack slots using a UUID or player name. Returns the cleared slot count.
Instructions
Remove every item from the 9 hotbar slots and 27 backpack slots of one entity or player. The target is an entity UUID or a player name. The cleared slot count is returned.
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>"
},
"name": "clearInventory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Entity UUID or player name (player names are case-insensitive) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | ||
| hotbar | Yes | ||
| inventory | Yes | ||
| usedSlots | Yes | ||
| hotbarUsed | Yes | ||
| totalSlots | Yes | ||
| clearedSlots | Yes | ||
| inventoryUsed | Yes |