Skip to main content
Glama

move-to-position

Move a Minecraft character to specific coordinates (x, y, z) with adjustable proximity range for precise positioning.

Instructions

Move the bot to a specific position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
zYesZ coordinate
rangeNoHow close to get to the target (default: 1)

Implementation Reference

  • The handler function that implements the core logic of the 'move-to-position' tool by using the mineflayer pathfinder to navigate the bot to the specified coordinates within the given range.
    async ({ x, y, z, range = 1 }) => { const bot = getBot(); const goal = new goals.GoalNear(x, y, z, range); await bot.pathfinder.goto(goal); return factory.createResponse(`Successfully moved to position near (${x}, ${y}, ${z})`); }
  • Zod schema defining the input parameters for the tool: required numeric x, y, z coordinates and optional range.
    { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), range: z.number().optional().describe("How close to get to the target (default: 1)") },
  • The factory.registerTool call that registers the 'move-to-position' tool, including its name, description, schema, and handler function.
    factory.registerTool( "move-to-position", "Move the bot to a specific position", { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), range: z.number().optional().describe("How close to get to the target (default: 1)") }, async ({ x, y, z, range = 1 }) => { const bot = getBot(); const goal = new goals.GoalNear(x, y, z, range); await bot.pathfinder.goto(goal); return factory.createResponse(`Successfully moved to position near (${x}, ${y}, ${z})`); } );
  • src/main.ts:51-51 (registration)
    Top-level call to registerPositionTools, which includes registration of the 'move-to-position' tool.
    registerPositionTools(factory, getBot);

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/yuniko-software/minecraft-mcp-server'

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