Skip to main content
Glama

get-position

Retrieve the current coordinates of your Minecraft character to track location and enable precise navigation in the game world.

Instructions

Get the current position of the bot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function retrieves the bot's current entity position, floors the X, Y, Z coordinates, formats them into a string, and returns it via factory.createResponse.
    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})`); }
  • Registration of the "get-position" tool with factory.registerTool, including name, description, empty input schema, and inline handler function.
    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 call to registerPositionTools function, which registers the get-position tool among others.
    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