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);
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Equip' implies a mutation (changing equipment state), but the description doesn't specify permissions needed, whether it's reversible, error conditions (e.g., if item not available), or what happens on success. It adds minimal context beyond the basic action.

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?

The description is very concise ('Equip a specific item')—just four words. It's front-loaded with the core action, but it might be overly terse, potentially under-specifying the tool's purpose. Every word earns its place, but more detail could improve clarity without sacrificing efficiency.

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?

Given no annotations, no output schema, and a mutation tool with 2 parameters, the description is incomplete. It doesn't explain what 'equip' entails (e.g., effects, return values), error handling, or how it fits with siblings. For a tool that likely changes state, more context is needed to guide effective use.

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?

Schema description coverage is 100%, with clear descriptions for both parameters (itemName and destination). The description doesn't add any meaning beyond the schema, such as examples or constraints (e.g., valid destination values beyond 'hand'). Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose3/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 verb ('equip') and resource ('item'), but it's vague about what 'equip' means in this context (e.g., in a game, inventory system) and doesn't distinguish from siblings like 'list-inventory' or 'find-item'. It's not tautological but lacks specificity.

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 on when to use this tool versus alternatives is provided. It doesn't mention prerequisites (e.g., needing the item in inventory), exclusions, or how it relates to sibling tools like 'list-inventory' for checking items or 'find-item' for locating them. Usage is implied but not explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zeeweebee/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server