Skip to main content
Glama

geom_measure

Read-onlyIdempotent

Calculate geodesic distance and bearing between points, or measure a geometry's area and perimeter, using accurate ellipsoidal algorithms.

Instructions

Measure geodesic distance and bearing between points, or a geometry's area.

Distances use Karney's algorithm on the WGS84 ellipsoid, accurate to millimetres at any distance including near-antipodal pairs. Areas are computed on the ellipsoid, not in degree space.

This is straight-line ("as the crow flies") distance. For travel distance and time along real roads, use route_directions instead -- road distance is typically 20-40% longer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYesStart position, in any coordinate notation or as a place name.
geojsonNoA GeoJSON or WKT geometry to measure instead of a point pair. Accepts a JSON object or a string. Returns geodesic area, perimeter, length, centroid and bounding box.
destinationNoEnd position. Omit when measuring a geometry supplied in `geojson` instead.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes
compassNo
geometryNo
midpointNo
distance_mNo
distance_kmNo
distance_milesNo
final_bearing_degNo
initial_bearing_degNo
distance_nautical_milesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds valuable context beyond that: the use of Karney's algorithm on WGS84, millimetre accuracy, near-antipodal robustness, and ellipsoidal area computation. It also clarifies that results are straight-line, which is a key behavioral trait not captured in annotations.

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 concise and well-structured: it front-loads the purpose, then provides algorithm details, and ends with a usage alternative. Every sentence adds value, with no redundancy or fluff.

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

Completeness5/5

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

The tool has a rich output schema (as indicated by 'Has output schema: true'), so the description need not explain return values. It covers the core computational behavior, accuracy, and the key distinction from route_directions, which is essential for correct usage. The parameter schema covers parameter semantics, so nothing critical is missing.

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?

Schema description coverage is 100%, so the schema already documents all three parameters (origin, geojson, destination). The description does not add parameter-specific meaning beyond what the schema provides, so the baseline of 3 is appropriate. It mentions area and distance but does not tie them to parameters beyond what the schema already does.

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 states a specific verb ('measure') and resource ('geodesic distance and bearing between points, or a geometry's area'), which clearly distinguishes it from sibling tools like route_directions. It also explicitly notes this is straight-line distance, making the tool's role unambiguous.

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

Usage Guidelines5/5

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

The description explicitly tells the agent when to use this tool vs. an alternative: 'For travel distance and time along real roads, use route_directions instead.' This is a clear exclusionary condition, and it also implies the intended use for geodesic/straight-line measurements.

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