Skip to main content
Glama
zeeweebee

Minecraft MCP Server

by zeeweebee

dig-block

Remove blocks at specified coordinates in Minecraft to clear terrain, create pathways, or gather resources through precise positional control.

Instructions

Dig a block at the specified position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
zYesZ coordinate

Implementation Reference

  • The main handler function for the 'dig-block' tool. It resolves the block position, checks if diggable, moves if necessary, and calls bot.dig(block) to dig it.
    async ({ x, y, z }): Promise<McpResponse> => {
      try {
        const blockPos = new Vec3(x, y, z);
        const block = bot.blockAt(blockPos);
    
        if (!block || block.name === 'air') {
          return createResponse(`No block found at position (${x}, ${y}, ${z})`);
        }
    
        if (!bot.canDigBlock(block) || !bot.canSeeBlock(block)) {
          // Try to move closer to dig the block
          const goal = new goals.GoalNear(x, y, z, 2);
          await bot.pathfinder.goto(goal);
        }
    
        await bot.dig(block);
    
        return createResponse(`Dug ${block.name} at (${x}, ${y}, ${z})`);
      } catch (error) {
        return createErrorResponse(error as Error);
      }
    }
  • Zod schema defining the input parameters: x, y, z coordinates as numbers.
    {
      x: z.number().describe("X coordinate"),
      y: z.number().describe("Y coordinate"),
      z: z.number().describe("Z coordinate"),
    },
  • src/bot.ts:406-436 (registration)
    The server.tool() call that registers the 'dig-block' tool with its name, description, schema, and handler function.
    server.tool(
      "dig-block",
      "Dig a block at the specified position",
      {
        x: z.number().describe("X coordinate"),
        y: z.number().describe("Y coordinate"),
        z: z.number().describe("Z coordinate"),
      },
      async ({ x, y, z }): Promise<McpResponse> => {
        try {
          const blockPos = new Vec3(x, y, z);
          const block = bot.blockAt(blockPos);
    
          if (!block || block.name === 'air') {
            return createResponse(`No block found at position (${x}, ${y}, ${z})`);
          }
    
          if (!bot.canDigBlock(block) || !bot.canSeeBlock(block)) {
            // Try to move closer to dig the block
            const goal = new goals.GoalNear(x, y, z, 2);
            await bot.pathfinder.goto(goal);
          }
    
          await bot.dig(block);
    
          return createResponse(`Dug ${block.name} at (${x}, ${y}, ${z})`);
        } 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. It states the action ('dig') but does not disclose behavioral traits like whether it requires specific permissions, destroys the block permanently, has rate limits, or what happens if the block is unbreakable. This is a significant gap 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?

The description is a single, efficient sentence with zero waste. It is front-loaded and appropriately sized for the tool's purpose, earning a perfect score for conciseness.

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 the complexity of a block-digging action with no annotations and no output schema, the description is incomplete. It lacks details on outcomes, errors, or side effects, making it inadequate for safe and effective use by an AI 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 has 100% description coverage, with clear parameter descriptions for x, y, and z coordinates. The description adds no additional meaning beyond the schema, such as coordinate system details or units, so it meets the baseline of 3.

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 clearly states the action ('dig') and target ('a block at the specified position'), which is specific and unambiguous. However, it does not differentiate from sibling tools like 'find-block' or 'place-block', which prevents a score of 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'find-block' for locating blocks or 'place-block' for placing them. It lacks context about prerequisites, such as needing to be near the block or having the right tool equipped.

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