Skip to main content
Glama

Give, take, or clear items

edit_items
Destructive

Give, 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

NameRequiredDescriptionDefault
itemNoFor give and set
slotNoFor set, take, and clear_slot
blockNoA container block instead of a player
actionYesWhat to do
amountNoFor take: how many; the whole stack when left out
playerNoPlayer name or UUID
containerNoFor a playerinventory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.2.1
    • addedInput schema / properties / action / description
      Added value: +"What to do"
  2. First observedv4.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructive/non-idempotent, but the description adds substantial context beyond them: cleared and taken items are permanently gone, player overflow drops at their feet while block overflow is lost and counted in `dropped`, clear also wipes armor and offhand, and the specific `player_offline` error. This is exactly the extra behavioral detail annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the resource and permissions, then walks actions and slot numbering in a tight sequence with no filler sentences. The nested parentheticals and run-on permission clause make it denser than ideal, but every sentence carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description still discloses the `dropped` count in the result and the `player_offline` error, plus full slot addressing for both player and container targets. For a 7-parameter destructive tool with nested objects, nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes well beyond the schema: it maps inventory slots (0–8 hotbar, 9–35 main, 36–40 armor/offhand), ender chest 0–26, container slots from 0, and explains a double chest is 54 with the left half first. It also clarifies `amount` defaults to the whole stack for take.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Change what a player's inventory or ender chest holds ... or a container block') and enumerates the five actions it performs. It is clearly distinguishable from siblings like set_blocks or run_command because it targets inventory/container contents rather than world state or arbitrary commands.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action's effect is spelled out (give adds where it fits, set replaces a slot, take removes amount, clear_slot vs clear), and prerequisites are given (players:write vs world:write, player must be online). It lacks an explicit 'use X instead' routing against siblings such as run_command, but the action-level guidance is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.