Skip to main content
Glama

Give, take, or clear items

edit_items
Destructive

Modify player inventories, ender chests, or container blocks by giving, setting, taking, or clearing items to manage slots and stacks.

Instructions

Change a player's inventory or ender chest (players:write, online), or a container block (world:write). give adds an item where it fits: a player's overflow drops at their feet, a block's is lost (dropped). set replaces a slot, take removes amount from one, clear_slot empties one, and clear empties all, armor included. Slots: 0–8 hotbar, 9–35 main, 36–39 boots to helmet, 40 offhand, ender chest 0–26. A double chest has 54, 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
itemNoGive `type` or a full `item`
slotNo
blockNoInstead of a player
actionYes
amountNoFor take: the whole stack when left out
playerNoPlayer name or UUID
containerNoFor a playerinventory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed28 schema fields changedv5.0.0
    • removedInput schema / properties / action / description
      Removed value: -"What to do"
    • changedInput schema / properties / amount / description
      Previous value: -"For take: how many; the whole stack when left out"New value: +"For take: the whole stack when left out"
    • changedInput schema / properties / amount / maximum
      Previous value: -9007199254740991New value: +6400
    • changedInput schema / properties / block / description
      Previous value: -"A container block instead of a player"New value: +"Instead of a player"
    • addedInput schema / properties / block / properties / world / minLength
      Added value: +1
    • removedInput schema / properties / block / properties / x / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / block / properties / x / minimum
      Removed value: --9007199254740991
    • addedInput schema / properties / block / properties / x / multipleOf
      Added value: +1
    • changedInput schema / properties / block / properties / x / type
      Previous value: -"integer"New value: +"number"
    • removedInput schema / properties / block / properties / y / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / block / properties / y / minimum
      Removed value: --9007199254740991
    • addedInput schema / properties / block / properties / y / multipleOf
      Added value: +1
    • changedInput schema / properties / block / properties / y / type
      Previous value: -"integer"New value: +"number"
    • removedInput schema / properties / block / properties / z / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / block / properties / z / minimum
      Removed value: --9007199254740991
    • addedInput schema / properties / block / properties / z / multipleOf
      Added value: +1
    • changedInput schema / properties / block / properties / z / type
      Previous value: -"integer"New value: +"number"
    • changedInput schema / properties / item / description
      Previous value: -"For give and set"New value: +"Give `type` or a full `item`"
    • removedInput schema / properties / item / properties / damage / maximum
      Removed value: -9007199254740991
    • changedInput schema / properties / item / properties / damage / minimum
      Previous value: --9007199254740991New value: +0
    • addedInput schema / properties / item / properties / damage / multipleOf
      Added value: +1
    • changedInput schema / properties / item / properties / damage / type
      Previous value: -"integer"New value: +"number"
    • changedInput schema / properties / item / properties / enchantments / description
      Previous value: -"Enchantment key to level"New value: +"Key to level"
    • changedInput schema / properties / item / properties / format / description
      Previous value: -"`minimessage` reads tags like `<green>Hi` or `<bold>`; `plain` sends the text as is"New value: +"`minimessage` reads tags like `<green>Hi`"
    • changedInput schema / properties / item / properties / item / description
      Previous value: -"Full item in command syntax, such as `minecraft:diamond_sword[enchantments={sharpness:5}]`"New value: +"Instead of type: command syntax, such as `minecraft:diamond_sword[enchantments={sharpness:5}]`"
    • removedInput schema / properties / item / properties / name / description
      Removed value: -"Custom name"
    • removedInput schema / properties / slot / description
      Removed value: -"For set, take, and clear_slot"
    • changedInput schema / properties / slot / maximum
      Previous value: -9007199254740991New value: +255
  2. Changed1 schema field changedv4.2.1
    • addedInput schema / properties / action / description
      Added value: +"What to do"
  3. First observedv4.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive/non-idempotent, and the description adds real consequences on top: give overflow drops at a player's feet but is lost in a block (surfaced via `dropped`), clear wipes all slots including armor, and take removes amount from a single slot. It also discloses the permission/online requirements, which the annotations do not cover.

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

Conciseness5/5

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

Front-loaded with the target and write scopes, then the per-action behaviors, then the slot table. Every clause carries a fact an agent needs; no filler or restatement of the title.

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

Completeness4/5

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

For a destructive, 7-parameter mutation tool with no output schema, this covers permissions, online requirements, per-action semantics, overflow loss, and slot numbering, plus a hint at the return field (`dropped`). It does not say how failures are reported (invalid slot, offline player) or what `set` does to a full stack, which leaves a small gap.

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

Parameters4/5

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

Schema coverage is 71%, and the description compensates well for the key gap by defining slot semantics (0–8 hotbar, 9–35 main, 36–39 boots→helmet, 40 offhand, ender chest 0–26) and the 54-slot double-chest ordering, none of which is in the schema. It adds little about the nested `item` fields (name, lore, format), which the schema already documents.

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?

The description names the specific resource (player inventory, ender chest, container block) and enumerates the five operations (give/set/take/clear_slot/clear), which matches the action enum exactly. An agent can distinguish this from read-oriented siblings such as get_player or find_containers without opening the schema.

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?

It gives concrete when-to-use context: players:write (online) vs world:write scoping the two target modes, and `block` explicitly flagged as 'Instead of a player'. That routes the agent between player and container targeting. It stops short of naming a sibling alternative or stating when not to use it (e.g. use find_containers first to locate a block).

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