Skip to main content
Glama
zeeweebee

Minecraft MCP Server

by zeeweebee

equip-item

Equip a specific item to a designated slot in Minecraft, such as the hand, to prepare for use during gameplay.

Instructions

Equip a specific item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemNameYesName of the item to equip
destinationNoWhere to equip the item (default: 'hand')

Implementation Reference

  • The core handler function for the 'equip-item' tool. It searches the bot's inventory for an item matching the given name (case-insensitive partial match), equips it to the specified destination (default 'hand') using bot.equip, and returns success/error messages.
    async ({ itemName, destination = 'hand' }): Promise<McpResponse> => {
      try {
        const items = bot.inventory.items();
        const item = items.find((item: any) =>
          item.name.includes(itemName.toLowerCase())
        );
    
        if (!item) {
          return createResponse(`Couldn't find any item matching '${itemName}' in inventory`);
        }
    
        await bot.equip(item, destination as mineflayer.EquipmentDestination);
        return createResponse(`Equipped ${item.name} to ${destination}`);
      } catch (error) {
        return createErrorResponse(error as Error);
      }
    }
  • Zod input schema for the 'equip-item' tool, defining parameters: itemName (required string) and destination (optional string, defaults to 'hand').
    {
      itemName: z.string().describe("Name of the item to equip"),
      destination: z.string().optional().describe("Where to equip the item (default: 'hand')")
    },
  • src/bot.ts:311-335 (registration)
    Registration of the 'equip-item' tool via server.tool() call within registerInventoryTools function, including description, schema, and inline handler implementation.
    server.tool(
      "equip-item",
      "Equip a specific item",
      {
        itemName: z.string().describe("Name of the item to equip"),
        destination: z.string().optional().describe("Where to equip the item (default: 'hand')")
      },
      async ({ itemName, destination = 'hand' }): Promise<McpResponse> => {
        try {
          const items = bot.inventory.items();
          const item = items.find((item: any) =>
            item.name.includes(itemName.toLowerCase())
          );
    
          if (!item) {
            return createResponse(`Couldn't find any item matching '${itemName}' in inventory`);
          }
    
          await bot.equip(item, destination as mineflayer.EquipmentDestination);
          return createResponse(`Equipped ${item.name} to ${destination}`);
        } catch (error) {
          return createErrorResponse(error as Error);
        }
      }
    );

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries full responsibility for disclosing side effects. It only says 'Equip', which implies a state change, but does not mention whether the current item is swapped, if the item must be owned, or how destination affects behavior.

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?

The description is a single, front-loaded sentence with zero wasted words. It is appropriately sized for the simple action it conveys.

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

Completeness2/5

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

Although there are only two parameters, the tool is a state-changing action with no annotations or output schema. The description fails to explain the meaning of 'equip' in the game context, such as what destination does or whether the item must be in inventory, leaving important gaps for an agent.

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

Parameters3/5

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

The input schema provides descriptions for both parameters (itemName and destination), covering 100%. The description itself adds no extra parameter nuance, so the baseline score of 3 applies.

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?

The description 'Equip a specific item' clearly states the action (equip) and resource (item). While it doesn't explicitly contrast with siblings like 'activate-item' or 'drop-item', the verb is distinct and unambiguous.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives, nor any prerequisites such as the item needing to be in inventory. The description is purely a flat action statement.

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