Skip to main content
Glama

getPosition

Retrieve the player's current coordinates in the Minecraft world to enable navigation, building, and location tracking.

Instructions

Get the current position of the player in the Minecraft world

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the getPosition tool. It checks if the bot is connected, retrieves the bot's entity position, formats it into a string, and returns a success response.
    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)
      }
    }
  • Registers the getPosition tool using server.tool method, with description, empty input schema, and inline handler function.
    server.tool(
      '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)
        }
      }
    )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool does but doesn't disclose behavioral traits like whether it requires the player to be in-game, if it returns coordinates in a specific format, error conditions, or performance characteristics.

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, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded for a simple tool.

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?

For a zero-parameter tool with no annotations and no output schema, the description is minimally adequate. It states what the tool does but lacks details about return format, error handling, or dependencies that would be helpful for an agent.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline 4 since it doesn't need to compensate for any gaps.

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

Purpose5/5

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

The description clearly states the specific action ('Get') and resource ('current position of the player in the Minecraft world'), distinguishing it from siblings like getNearbyEntities or getServerInfo by focusing on player position specifically.

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. While the purpose is clear, there's no mention of prerequisites, timing considerations, or how it differs from other position-related tools (though none exist in the sibling list).

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