Skip to main content
Glama

get-position

Retrieve the precise in-game coordinates of your Minecraft bot for accurate navigation and positioning within the MCP server environment.

Instructions

Get the current position of the bot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function that implements the 'get-position' tool logic: retrieves the bot's current position, floors the x, y, z coordinates, and returns a formatted response string.
    async () => { const bot = getBot(); const position = bot.entity.position; const pos = { x: Math.floor(position.x), y: Math.floor(position.y), z: Math.floor(position.z) }; return factory.createResponse(`Current position: (${pos.x}, ${pos.y}, ${pos.z})`); }
  • Registers the 'get-position' tool with ToolFactory, including tool name, description, empty input schema, and inline handler.
    factory.registerTool( "get-position", "Get the current position of the bot", {}, async () => { const bot = getBot(); const position = bot.entity.position; const pos = { x: Math.floor(position.x), y: Math.floor(position.y), z: Math.floor(position.z) }; return factory.createResponse(`Current position: (${pos.x}, ${pos.y}, ${pos.z})`); } );
  • src/main.ts:51-51 (registration)
    Top-level registration call in main.ts that invokes registerPositionTools to set up the position tools (including 'get-position') with the MCP ToolFactory and bot getter.
    registerPositionTools(factory, getBot);

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