Skip to main content
Glama

Distance

distance
Read-only

The great-circle distance between two points in km and miles, the initial bearing and the midpoint. Each point is a lat,lon pair or a place name (geocoded with OpenStreetMap data, ODbL). Straight-line distance only, not a route. Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
toYeslat,lon or a place name
fromYeslat,lon or a place name

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
sourceNo
midpointNo
checkedAtNo
distanceKmNo
distanceMilesNo
initialBearingDegNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses the per-call price ($0.002 USDC), the payment rails (x402 on Base, Solana, Arc), that failed calls are not charged, and that place names are geocoded via OpenStreetMap/ODbL. Cost and billing semantics are exactly the kind of context annotations cannot convey.

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?

Two dense sentences, front-loaded with the output content (distance, bearing, midpoint) before the caveat and pricing. The pricing clause is long but every element (price, currency, rails, failure policy) is decision-relevant; minimal waste overall.

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?

With an output schema present, the description need not restate return fields, and it doesn't. It covers inputs, geocoding behavior, the straight-line limitation, and the billing model, leaving nothing an agent needs before calling.

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 coverage is 100% and both parameters are already documented as 'lat,lon or a place name,' so the baseline is 3. The description adds real value on top by explaining how place-name inputs are resolved (OSM geocoding, ODbL data), which tells the agent that free-text lookups are permitted and where the data comes from.

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 precise verb+resource: computes great-circle distance between two points, plus initial bearing and midpoint. The 'straight-line distance only, not a route' clause explicitly separates it from routing/flight-path style tools in the sibling list, so an agent can route correctly without reading the schema.

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?

Clearly delimits scope with 'Straight-line distance only, not a route,' which is the main misuse risk. It does not name a concrete alternative sibling (e.g., geocode or places) for when the caller actually needs address resolution or a route, so it stops short of full when/when-not routing.

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.

Resources