Skip to main content
Glama

Distancia entre dos ciudades

city-distance
Read-onlyIdempotent

Calcula la distancia ortodrómica (km, millas, millas náuticas) y el rumbo inicial entre dos ciudades dadas por nombre, eligiendo la coincidencia más poblada de la lista GeoNames incluida (o dentro de un país dado). Cuándo: hay que calcular coordenadas, distancias, rumbos o áreas a partir de puntos dados. No para: calcular la distancia ortodrómica entre dos puntos (geo-haversine). 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 (km, miles, nautical miles) and initial bearing between two cities given by name, resolving each to its most populous match in the embedded GeoNames list (or within a given country) and reporting other matches. When: coordinates, distances, bearings or areas have to be computed from given points. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
toYesCity name in its usual or Spanish form; a trailing ", country" narrows it (Medellín, Valencia, Venezuela, Nueva York) (string; required; at least 2 chars; up to 100 chars).
fromYesCity name in its usual or Spanish form; a trailing ", country" narrows it (Medellín, Valencia, Venezuela, Nueva York) (string; required; at least 2 chars; up to 100 chars).
to_countryNoOptional country (ISO code or name) to tell apart cities with the same name (string; optional; at least 1 chars; up to 80 chars).
from_countryNoOptional country (ISO code or name) to tell apart cities with the same name (string; optional; at least 1 chars; up to 80 chars).

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
methodNo
sourceNo
compassNo
ambiguousNo
distance_kmNo
distance_miNo
distance_nmiNo
other_matchesNo
initial_bearingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / from / examples
      Added value: +[
      +  "Bogotá"
      +]
    • addedInput schema / properties / to / examples
      Added value: +[
      +  "Medellín"
      +]
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, and the description repeats that as 'no side effects, no network, no stored state'. The real added value is beyond annotations: determinism, the 64 KB input / 1 s / 1 MB result limits, and the tie-breaking behavior of resolving to the most populous match while reporting other matches.

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?

Well front-loaded: purpose, then when/not-for, then side effects, determinism and limits in a compact labeled structure. It loses a little to the duplicated Spanish/English text and the inaccurate 'áreas' item in the when-clause, which is noise an agent must filter.

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?

With annotations covering the safety profile and an output schema covering the return values, the description supplies what's missing: limits, determinism, and disambiguation behavior. The only remaining ambiguity is what happens with country filtering across the two endpoints versus the inline ', country' suffix, which is left implicit.

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%, so the baseline is 3; the description earns above that by explaining the semantics behind the name fields — resolution against the embedded GeoNames list, most-populous selection, and optional country narrowing to disambiguate same-named cities, which the schema only states as 'optional country'.

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: computes great-circle distance in three unit systems plus initial bearing between two named cities, and explains the name-resolution rule (most populous GeoNames match). It also explicitly separates itself from geo-haversine, so an agent can route between them without opening either 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?

The 'No para' clause names the alternative (geo-haversine) and the condition that selects it, which is exactly the discrimination that matters here. The 'When' clause is weaker — it generically mentions 'coordinates, distances, bearings or areas', and this tool does not compute areas (geo-polygon-area does), so part of the routing guidance is borrowed boilerplate.

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