Skip to main content
Glama

Distancia ortodrómica (haversine)

geo-haversine
Read-onlyIdempotent

Calcula la distancia ortodrómica entre dos puntos (fórmula haversine, Tierra esférica), en m, km, mi, nmi o ft. Cuándo: hay que calcular coordenadas, distancias, rumbos o áreas a partir de puntos dados. No para: calcular la distancia sobre el elipsoide WGS84 entre dos puntos (geo-vincenty). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Computes the great-circle distance between two lat/lon points on a spherical Earth (mean radius 6,371.0088 km), in m, km, mi, nmi or ft. Error up to about 0.5% versus the ellipsoid. When: coordinates, distances, bearings or areas have to be computed from given points. Not for: computing the ellipsoidal (WGS84) distance between two points (geo-vincenty). Side effects: none (read-only, no network access, no stored state). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
toYesPoint as {lat, lon} in decimal degrees (WGS84) (object; required).
fromYesPoint as {lat, lon} in decimal degrees (WGS84) (object; required).
unitNoDistance unit (optional; one of: m, km, mi, nmi, ft; default "km").km

Output Schema

NameRequiredDescriptionDefault
unitNo
distanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / from / examples
      Added value: +[
      +  {
      +    "lat": 51.5074,
      +    "lon": -0.1278
      +  }
      +]
    • addedInput schema / properties / to / examples
      Added value: +[
      +  {
      +    "lat": 48.8566,
      +    "lon": 2.3522
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Computes the great-circle distance between two lat/lon points on a spherical Earth (mean radius 6,371.0088 km), in m, km, mi, nmi or ft. Error up to about 0.5% versus the ellipsoid. When: coordinates, distances, bearings or areas have to be computed from given points. Not for: computing the ellipsoidal (WGS84) distance between two points (geo-vincenty). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, and the description is consistent with all of them. It adds context the annotations do not carry: the ~0.5% error versus the ellipsoid, determinism, and hard limits (64 KB input, 1 s per call, 1 MB result) — exactly the operational facts an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is well front-loaded and labeled (Cuándo / No para / Efectos / Determinista / Límites), but every sentence is duplicated in Spanish and English, roughly doubling length, and the trailing '[EN completo / full EN: inputSchema.description]' pointer is meta-noise. Half the text could be cut without losing 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, so return values need not be explained. Combined with the stated error tolerance, unit options, resource limits and the explicit exclusion of geo-vincenty, an agent has everything required to choose and invoke this tool correctly.

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 ranges, the {lat, lon} shape and the unit enum are already fully documented in the schema. The description restates the five units but adds no format or syntax detail beyond it. Baseline 3 applies when the schema does the heavy lifting.

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 ('Calcula la distancia ortodrómica entre dos puntos' / computes great-circle distance), names the exact model used (haversine, spherical Earth, mean radius 6,371.0088 km) and the output units. It also names the sibling it is not (geo-vincenty / ellipsoidal WGS84), so an agent can separate it from the other distance tools 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 Guidelines5/5

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

Explicit 'Cuándo:' / 'When:' section gives the positive trigger (computing coordinates, distances, bearings or areas from given points) and an explicit 'No para:' / 'Not for:' that names the alternative tool geo-vincenty and the condition (ellipsoidal WGS84 distance) that selects it. Nothing is left to inference.

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