Skip to main content
Glama

Give, take, or clear items

edit_items
Destructive

Modify items in player inventories, ender chests, or container blocks by giving, setting, taking, or clearing slots. Drops overflow for players and reports what was removed.

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.

Input Schema

NameRequiredDescriptionDefault
itemNoFor give and set
slotNoFor set, take, and clear_slot
blockNoA container block instead of a player
actionYes
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. First observedv4.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/idempotentHint annotations: it discloses required permissions, the online-player precondition with the exact error code, overflow behavior (player drops at feet, block items are lost and tallied in `dropped`), and the irreversibility of cleared/taken items. That is precisely the mutation-risk context an agent needs before calling a destructive tool.

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?

Dense but front-loaded: target and permissions first, then per-action semantics, then slot reference data last. Every clause carries information; there is no filler or repetition of the schema.

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, nested-object, 7-parameter tool with no output schema, the description covers targets, permissions, per-action effects, and return hints (`dropped`, 'says what it took'). The preconditions for `set`/`give` combinations and what happens when a block target isn't a container are only implied, leaving minor gaps.

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 already 86%, yet the description still adds substantial meaning: it maps every slot index (0–8 hotbar, 36–39 armor, 40 offhand, ender chest 0–26, container 0–53 left-half-first) and clarifies `amount` semantics for take ('the whole stack when left out'). It also ties parameters to actions, which the schema does not do.

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?

States a specific verb-plus-resource: change what a player's inventory/ender chest or a container block holds. It immediately enumerates the five supported actions (give, set, take, clear_slot, clear), so an agent can distinguish this item-mutation tool from siblings like set_blocks or run_command.

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 an item where it fits', 'set puts an item in a slot, replacing what was there', 'clear empties everything, armor and offhand included'), which tells an agent exactly which action to pick. Preconditions (players:write / world:write, player must be online else `player_offline`) are explicit. It stops short of naming a sibling alternative for cases this tool can't cover.

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