Skip to main content
Glama

look-at

Direct a Minecraft character's gaze to specific coordinates using X, Y, and Z position values for precise targeting and interaction.

Instructions

Make the bot look at a specific position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
zYesZ coordinate

Implementation Reference

  • The core handler function for the 'look-at' tool. Retrieves the bot instance, computes the target position as a Vec3, calls bot.lookAt to orient the bot towards it, and returns a confirmation response.
    async ({ x, y, z }) => { const bot = getBot(); await bot.lookAt(new Vec3(x, y, z), true); return factory.createResponse(`Looking at position (${x}, ${y}, ${z})`); }
  • Input schema using Zod validation, requiring numeric coordinates x, y, z for the target position.
    { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), },
  • The factory.registerTool call that registers the 'look-at' tool, specifying its name, description, input schema, and handler function.
    factory.registerTool( "look-at", "Make the bot look at a specific position", { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), }, async ({ x, y, z }) => { const bot = getBot(); await bot.lookAt(new Vec3(x, y, z), true); return factory.createResponse(`Looking at position (${x}, ${y}, ${z})`); } );
  • src/main.ts:51-51 (registration)
    Top-level call to registerPositionTools in main.ts, which triggers the registration of the 'look-at' tool among other position tools.
    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