Skip to main content
Glama

lookAt

Control a player’s view by directing them to look at specific X, Y, and Z coordinates in Minecraft, enhancing navigation and interaction tasks on remote servers.

Instructions

Make the player look in a specific direction or at coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate to look at
yYesY coordinate to look at
zYesZ coordinate to look at

Implementation Reference

  • The main handler function for the 'lookAt' tool. It validates bot connection, calls bot.lookAt with Vec3 coordinates, and returns appropriate success or error responses.
    async ({ x, y, z }) => { if (!botState.isConnected || !botState.bot) { return createNotConnectedResponse() } try { await botState.bot.lookAt(new Vec3(x, y, z)) return createSuccessResponse( `Looking at coordinates: X=${x}, Y=${y}, Z=${z}` ) } catch (error) { return createErrorResponse(error) } }
  • Input schema using Zod for validating x, y, z numeric coordinates.
    { x: z.number().describe('X coordinate to look at'), y: z.number().describe('Y coordinate to look at'), z: z.number().describe('Z coordinate to look at'), },
  • Registration of the 'lookAt' tool via server.tool, including name, description, input schema, and handler function.
    server.tool( 'lookAt', 'Make the player look in a specific direction or at coordinates', { x: z.number().describe('X coordinate to look at'), y: z.number().describe('Y coordinate to look at'), z: z.number().describe('Z coordinate to look at'), }, async ({ x, y, z }) => { if (!botState.isConnected || !botState.bot) { return createNotConnectedResponse() } try { await botState.bot.lookAt(new Vec3(x, y, z)) return createSuccessResponse( `Looking at coordinates: X=${x}, Y=${y}, Z=${z}` ) } catch (error) { return createErrorResponse(error) } } )

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/nacal/mcp-minecraft-remote'

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