Skip to main content
Glama

lookAt

Direct the player's gaze to any set of 3D coordinates, enabling precise control over the player's view direction for navigation or building tasks.

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 tool handler for 'lookAt' - calls bot.lookAt() with Vec3 coordinates. Registered on line 83 via server.tool().
    // Tool for looking in a direction
    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)
        }
      }
    )
  • Input schema for 'lookAt' - defines x, y, z as required numeric parameters using Zod.
    {
      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 call - registerBasicMovementTools() is called within registerAllTools() to register all tools.
    registerBasicMovementTools()
  • The registration function export. The 'lookAt' tool is registered inside this function via server.tool().
    export function registerBasicMovementTools() {
  • Helper functions used by the handler - createSuccessResponse, createErrorResponse, and createNotConnectedResponse.
    export function createErrorResponse(error: unknown): ToolResponse {
      return {
        content: [
          {
            type: 'text',
            text: `Error: ${
              error instanceof Error ? error.message : String(error)
            }`,
          },
        ],
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the basic action. It does not disclose whether the look is instantaneous, if it can be interrupted, or if it requires the player to be in a particular state (e.g., not in a menu).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence without unnecessary words. It is front-loaded and efficiently conveys the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a simple tool with clear parameters and no output schema. However, it lacks context about when in the game loop to use it (e.g., real-time vs turn-based) and whether it has side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides descriptions for all three parameters with 100% coverage. The description adds no extra meaning beyond the schema, meeting baseline but not exceeding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool makes the player look in a specific direction or at coordinates, using a verb and resource. It distinguishes from siblings like moveTo by focusing on looking rather than movement, but could be more specific about behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives (e.g., when to use lookAt vs moveTo or attackEntity). The description does not mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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