Skip to main content
Glama

GeoSpark

Geodesic distance

calculate_distance
Read-onlyIdempotent

Exact geodesic distance between two places or geometries on the WGS84 ellipsoid.

    Use for any "how far" question instead of estimating. For NAMED places pass place_a and
    place_b; the server geocodes them, so never type coordinates for a place yourself. Use
    point_a/point_b only for coordinates the user gave or another tool returned. For lines
    and polygons the distance is between their nearest points. Returns metres and kilometres.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
place_aNoA place NAME, e.g. 'Adelaide Oval'; geocoded on the server (preferred)
place_bNoA place NAME, e.g. 'Adelaide Oval'; geocoded on the server (preferred)
point_aNoA GeoJSON geometry, e.g. {"type": "Point", "coordinates": [lon, lat]}; only for coordinates the user gave or a tool returned
point_bNoA GeoJSON geometry, e.g. {"type": "Point", "coordinates": [lon, lat]}; only for coordinates the user gave or a tool returned

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitsNoUnit of each numeric field
placesNoNamed places as geocoded on the server: query, display_name, coordinates [lon, lat]
statusNook
warningsNoCaveats to tell the user
distance_mYesGeodesic distance in metres (WGS84 ellipsoid)
provenanceNoSource, licence, attribution, retrieval time and method
distance_kmYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Goes beyond the readOnly/idempotent/openWorld annotations by disclosing server-side geocoding of names, that lines and polygons are measured between nearest points, and that results come in metres and kilometres. It omits failure behavior (what happens when a place name cannot be geocoded), which matters for an open-world geocoder-backed tool.

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?

Four short lines, front-loaded with the core definition, then the selection rule, then a caveat about geometry inputs, then the return units. No filler sentences; each line carries a distinct piece of information.

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?

An output schema exists, yet the description still names the return units, and the geocoding and nearest-point semantics cover the two non-obvious behaviors. Nothing an agent needs to call this correctly 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 coverage is 100% and the per-parameter descriptions already state 'geocoded on the server (preferred)' and 'only for coordinates the user gave or a tool returned', so the description largely restates the schema. Baseline 3 applies; the prose form is more readable but adds no new semantic detail such as mutual-exclusion rules or what happens if both families are supplied.

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?

States a specific verb and resource ('Exact geodesic distance between two places or geometries on the WGS84 ellipsoid'), including the precision model, which separates it from route/travel_time_matrix/isochrone siblings. An agent can tell instantly this is straight-line distance, not travel distance.

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?

Explicitly says when to use it ('any "how far" question instead of estimating') and gives a clear rule for choosing between the named-place and point parameter families, including a prohibition ('never type coordinates for a place yourself'). It does not name a sibling alternative (e.g. route for travel distance/time), so the routing guidance is implied rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.