Skip to main content
Glama

move-to-position

Guide the bot to a specified coordinate in Minecraft using X, Y, Z values and an optional range parameter for precise navigation.

Instructions

Move the bot to a specific position

Input Schema

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

Implementation Reference

  • Handler function that executes the logic to move the Minecraft bot to the target position using pathfinder's GoalNear and goto method.
    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 for input validation of 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)") },
  • Registration of the move-to-position tool with the ToolFactory, including name, description, schema, and handler.
    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})`); } );

Other Tools

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

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