Skip to main content
Glama

Distance Calculator

geo_time_distance_calculator

Great-circle (haversine) distance between two latitude/longitude points in km, miles and nautical miles, plus initial bearing and the geographic midpoint. Deterministic spherical math on the IUGG mean Earth radius. Use this when an agent needs to great-circle distance and bearing between coordinates. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lat1YesLatitude 1
lat2YesLatitude 2
lon1YesLongitude 1
lon2YesLongitude 2

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does reasonably well: it discloses the deterministic spherical model, the IUGG mean Earth radius (implying an approximation, not WGS84 ellipsoid), the exact output units, and the x402 payment requirement of $0.01/call in USDC on eip155:8453. It does not cover behavior on invalid or out-of-range coordinates, which is the main remaining gap.

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?

Four sentences, front-loaded with the core computation and outputs, then the model, then usage, then price. The 'Use this when...' sentence is slightly malformed and redundant with the opening, but nothing is padded.

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?

No output schema exists, and the description does list what is returned (three distance units plus bearing and midpoint), so return-value coverage is adequate. Cost and determinism are both disclosed. Error/validation behavior for bad coordinates is the only meaningful omission.

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 four coordinate parameters; the baseline is 3. The description adds no format detail beyond it, such as degrees vs. radians or acceptable latitude/longitude ranges, so it neither compensates nor detracts.

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 names a specific computation (great-circle/haversine distance), the exact inputs (two lat/long points), and the full return set (km, miles, nautical miles, initial bearing, midpoint). No sibling tool computes distance, so the agent can distinguish this without opening a schema.

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

Usage Guidelines3/5

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

It offers the sentence 'Use this when an agent needs to great-circle distance and bearing between coordinates,' which is a usage statement but essentially restates the purpose rather than scoping against alternatives (e.g. sun_position, geocode). No exclusions or prerequisites beyond the price note.

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