Skip to main content
Glama
zeeweebee

Minecraft MCP Server

by zeeweebee

move-in-direction

Control Minecraft bot movement by specifying direction and duration to navigate the game world.

Instructions

Move the bot in a specific direction for a duration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYesDirection to move
durationNoDuration in milliseconds (default: 1000)

Implementation Reference

  • The handler function that implements the tool logic: sets the Minecraft bot's control state for the given direction, waits for the specified duration using setTimeout, then stops the movement and returns success message. Handles errors by stopping movement.
    async ({ direction, duration = 1000 }: { direction: Direction, duration?: number }): Promise<McpResponse> => {
      return new Promise((resolve) => {
        try {
          bot.setControlState(direction, true);
    
          setTimeout(() => {
            bot.setControlState(direction, false);
            resolve(createResponse(`Moved ${direction} for ${duration}ms`));
          }, duration);
        } catch (error) {
          bot.setControlState(direction, false);
          resolve(createErrorResponse(error as Error));
        }
      });
    }
  • Zod schema defining the input parameters for the 'move-in-direction' tool: required 'direction' as enum and optional 'duration' in ms.
    {
      direction: z.enum(['forward', 'back', 'left', 'right']).describe("Direction to move"),
      duration: z.number().optional().describe("Duration in milliseconds (default: 1000)")
    },
  • src/bot.ts:230-252 (registration)
    The MCP server.tool() call that registers the 'move-in-direction' tool, providing name, description, input schema, and inline handler function.
    server.tool(
      "move-in-direction",
      "Move the bot in a specific direction for a duration",
      {
        direction: z.enum(['forward', 'back', 'left', 'right']).describe("Direction to move"),
        duration: z.number().optional().describe("Duration in milliseconds (default: 1000)")
      },
      async ({ direction, duration = 1000 }: { direction: Direction, duration?: number }): Promise<McpResponse> => {
        return new Promise((resolve) => {
          try {
            bot.setControlState(direction, true);
    
            setTimeout(() => {
              bot.setControlState(direction, false);
              resolve(createResponse(`Moved ${direction} for ${duration}ms`));
            }, duration);
          } catch (error) {
            bot.setControlState(direction, false);
            resolve(createErrorResponse(error as Error));
          }
        });
      }
    );
  • TypeScript type definition for the 'Direction' enum used in the tool's handler signature and schema.
    type Direction = 'forward' | 'back' | 'left' | 'right';
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. It states the action ('Move the bot') but doesn't clarify what 'move' entails (e.g., walking, flying, teleporting), whether it's instantaneous or gradual, if it requires specific permissions or game modes, or what happens on failure (e.g., hitting an obstacle). For a movement tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

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 that front-loads the core action ('Move the bot') and specifies key details ('in a specific direction for a duration') without any fluff. Every word earns its place, making it easy to parse quickly. No structural issues or redundancy are present.

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 movement action in a game-like context (implied by sibling tools like 'dig-block'), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects (e.g., how movement interacts with the environment), error conditions, or return values, leaving significant gaps for the agent to operate effectively.

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 both parameters ('direction' and 'duration') well-documented in the schema (including enum values and default). The description adds minimal value beyond the schema by implying direction and duration are used together, but doesn't provide additional context like unit explanations or practical examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Move the bot') and specifies the resource/scope ('in a specific direction for a duration'), making the purpose immediately understandable. It distinguishes from siblings like 'move-to-position' (which uses coordinates) and 'fly-to' (which implies flying to a location), though it doesn't explicitly mention these distinctions. The description avoids tautology by not just restating the tool name.

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 'move-to-position' or 'fly-to'. It doesn't mention prerequisites (e.g., whether the bot needs to be on ground), exclusions, or typical use cases. The agent must infer usage from context alone, which is insufficient for optimal tool selection.

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