Skip to main content
Glama

Enchant held item

enchant_held_item
Idempotent

Enchant the item in an online player's main hand with a specified enchantment and level; fails when the hand is empty.

Instructions

Add an enchantment to the item in an online player's main hand (fails if the hand is empty).

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": {
      "username": "<username>",
      "enchantment": "<enchantment>"
    },
    "name": "enchant_held_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelNoEnchantment level; levels above vanilla maxima are allowed.
usernameYesExact, case-sensitive name of an online player.
enchantmentYesEnchantment id such as 'sharpness', 'efficiency' or 'minecraft:unbreaking'.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare mutation, non-destructiveness, idempotency and closed-world scope, so the description's added failure case (empty main hand) is useful but modest. It does not clarify whether an existing enchantment of the same type is overwritten or the new one is merged alongside others, which matters for a mutation 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?

A single sentence that front-loads the action and target, then appends the failure condition compactly. No redundant or filler wording.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and annotations cover the safety profile. Still, for a mutation of player-held state, the description leaves the overwrite-versus-stack semantics and any permission or availability requirements unaddressed.

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 description coverage is 100%, so all three parameters (username, enchantment, level) are fully documented in the schema itself, including the non-vanilla level allowance and enchantment id format. The description needs only to reinforce that the username must be an online player, which it does.

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

Purpose4/5

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

States a specific verb and resource: adding an enchantment to the item in an online player's main hand. The target scope (main hand, online player) distinguishes it reasonably well from inventory-wide or entity-level siblings, though it doesn't explicitly name an alternative tool.

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

Usage Guidelines3/5

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

Implied when-to-use is clear from the phrasing (a player must be online and holding an item), and the parenthetical adds a precondition. However, there is no explicit routing guidance against alternatives such as give_item for adding enchanted items outright.

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