Skip to main content
Glama

Measure a distance

measure-distance
Read-onlyIdempotent

Measure distance between two tokens or points with optional waypoints. Returns scene units and grid spaces, following grid and diagonal rules; token centers count, no canvas needed.

Instructions

Measure between two tokens or points, optionally via waypoints, in the scene's units and grid spaces, following the grid and the diagonal rule of the world. Token centers count. Works without a drawn canvas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd: { tokenId } (id or name of a token), or { x, y } in pixels
viaNoWaypoints in between: { x, y }
fromYesStart: { tokenId } (id or name of a token), or { x, y } in pixels
sceneIdentifierNoScene id or name; default the scene that is active for everyone

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint and idempotentHint. The description adds useful behavioral details such as token centers counting, following grid and diagonal rule, and working without a drawn canvas. This goes beyond the annotations without contradicting them.

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 three short sentences with the main purpose front-loaded. It includes only essential details and no redundant wording, earning a high score for conciseness and structure.

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?

The description covers core behavior and constraints well, given the tool has no output schema. However, it does not specify the return value or how waypoints affect the result, which are minor gaps for a read-only measurement tool with strong annotations.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds interpretive meaning by specifying that token centers count and that measurement follows the grid and diagonal rule, which clarifies how from/to and waypoints are handled.

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 tool measures distance between two tokens or points, with optional waypoints, in scene units and grid spaces. It distinguishes this from sibling tools like find-path or check-wall-collision by focusing on measurement rather than pathfinding or collision.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool (measuring distances between tokens/points, with waypoints, without a canvas), but it does not explicitly name alternatives or state when not to use it. This is clear context without exclusions.

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

Deploy Server

Other Tools