Skip to main content
Glama

measure_distance

Calculate distances between positions or entities on a battlefield using D&D 5e rules. Returns results in feet for tactical movement and range determination.

Instructions

Calculate the distance between two points or entities on the battlefield. Returns distance in feet (5ft per square, diagonal = 5ft using D&D simplified rules).

Example - Between two coordinates: { "encounterId": "encounter-1", "from": { "type": "position", "value": "10,10" }, "to": { "type": "position", "value": "15,18" } }

Example - Between two entities: { "encounterId": "encounter-1", "from": { "type": "entity", "value": "hero-1" }, "to": { "type": "entity", "value": "goblin-3" } }

Example - From entity to position: { "encounterId": "encounter-1", "from": { "type": "entity", "value": "wizard-1" }, "to": { "type": "position", "value": "25,30" } }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encounterIdYesThe ID of the encounter
fromYes
toYes
sessionIdNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains the calculation rules (5ft per square, diagonal rules), return format (distance in feet), and provides comprehensive examples showing different input patterns. However, it doesn't mention error conditions, performance characteristics, or authentication requirements.

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

Conciseness4/5

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

The description is efficiently structured with a clear purpose statement followed by practical examples. While the examples are necessary for clarity, they make the description longer than minimal. Every sentence serves a purpose, and information is well-organized from general to specific.

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

Completeness4/5

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

For a calculation tool with no annotations and no output schema, the description provides comprehensive coverage of what the tool does, how to use it, and what it returns. The examples effectively demonstrate parameter usage, and the distance calculation rules are clearly explained. The main gap is the lack of error handling information.

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

Parameters5/5

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

With only 25% schema description coverage, the description provides excellent compensation through detailed examples that demonstrate all parameter combinations. The examples show exactly how to structure 'from' and 'to' objects with different 'type' values, clarifying what the schema leaves ambiguous about coordinate formats and entity references.

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 ('calculate the distance') and resource ('between two points or entities on the battlefield'), with explicit measurement units and rules. It distinguishes itself from sibling tools by focusing purely on distance calculation rather than combat actions, movement, or other spatial operations.

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

Usage Guidelines3/5

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

The description implies usage through examples showing different scenarios (coordinates, entities, mixed), but doesn't explicitly state when to use this tool versus alternatives. No guidance is provided about prerequisites, limitations, or when other tools might be more appropriate for related spatial calculations.

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/Mnehmos/mnehmos.rpg.mcp'

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