Skip to main content
Glama

Distance between coordinates: km, miles, bearing and midpoint

geo_distance
Read-only

Great-circle distance between two latitude/longitude points (haversine on the mean earth radius) in kilometres, miles and nautical miles, plus the initial compass bearing and the midpoint. Accurate to about 0.5% against the ellipsoid. Use for delivery radius, travel and proximity checks, or sorting places by distance; for coordinates of a place name use geocode first. Example: lat1=59.3293, lon1=18.0686, lat2=51.5072, lon2=-0.1276. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
lat1YesLatitude of the first point (-90 to 90)
lat2YesLatitude of the second point
lon1YesLongitude of the first point (-180 to 180)
lon2YesLongitude of the second point

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotation coverage is strong, and the description adds accuracy (about 0.5%), billing details ($0.01/call, first 25 free, failed calls free), and the repeat-call charging nuance. It also explicitly confirms the tool reads/computes only and changes nothing.

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 purpose is front-loaded, followed by use cases, an example, pricing, and safety behavior. The text is dense but every sentence adds useful operational or behavioral context.

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?

No output schema exists, but the description fully explains the return components: distances in three units, initial bearing, and midpoint. Accuracy, billing, and safety behavior are also covered.

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 lat/lon semantics are already documented. The description provides a concrete coordinate example, but does not add parameter-level constraints beyond what the schema already states.

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 computation: great-circle distance between two lat/lon points, returning km/miles/nautical miles plus bearing and midpoint. It distinguishes itself from coordinate-lookup tools by directing place-name inputs to geocode first.

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?

Gives clear use cases such as delivery radius, travel/proximity checks, and sorting by distance, and names the geocode prerequisite for place names. It does not explicitly state when not to use the tool, but the intended context is clear.

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.