getPosition
Retrieve the exact coordinates of a player within the Minecraft world using a remote server integration. Simplify navigation and location tracking for enhanced gameplay or automation tasks.
Instructions
Get the current position of the player in the Minecraft world
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/movement.ts:16-35 (registration)Registers the 'getPosition' MCP tool. The handler retrieves and returns the bot's current entity position in the Minecraft world (X, Y, Z coordinates). Uses empty schema ({}).'getPosition', 'Get the current position of the player in the Minecraft world', {}, async () => { if (!botState.isConnected || !botState.bot) { return createNotConnectedResponse() } try { const position = botState.bot.entity.position return createSuccessResponse( `Current position: X=${position.x.toFixed(2)}, Y=${position.y.toFixed( 2 )}, Z=${position.z.toFixed(2)}` ) } catch (error) { return createErrorResponse(error) } } )