Skip to main content
Glama

Puntos más cercanos

geo-nearest
Read-onlyIdempotent

Ordena puntos candidatos por distancia desde un origen y devuelve los k más cercanos. 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: Ranks up to 10,000 candidate points by great-circle distance from an origin and returns the k nearest with their distances and original indices. When: coordinates, distances, bearings or areas have to be computed from given points. Not for: computing the great-circle distance between two lat/lon points on a spherical Earth (geo-haversine). 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.

Input Schema

NameRequiredDescriptionDefault
kNoHow many (integer; optional; default 3; min 1; max 1000).
unitNoDistance unit (optional; one of: m, km, mi, nmi, ft; default "km").km
originYesPoint as {lat, lon} in decimal degrees (WGS84) (object; required).
candidatesYesCandidates; extra fields like id/name are returned (array of object; required; at least 1 items).
max_distanceNoIgnore farther than this (number; optional; > 0).

Output Schema

NameRequiredDescriptionDefault
unitNo
resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / candidates / examples
      Added value: +[
      +  [
      +    {
      +      "lat": 6.2442,
      +      "lon": -75.5812
      +    }
      +  ]
      +]
    • addedInput schema / properties / origin / examples
      Added value: +[
      +  {
      +    "lat": 4.711,
      +    "lon": -74.0721
      +  }
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false, and destructiveHint=false. The description adds genuinely useful behavioral information beyond those annotations: no network access, no stored state, determinism, and concrete input/output size and time limits. It does repeat the read-only/no-side-effects point, so it falls just short of a 5.

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?

Each language version is front-loaded and efficient, covering purpose, usage, side effects, determinism, and limits without filler. The bilingual duplication is helpful for accessibility but does double the overall length.

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?

Given five parameters, nested objects, an output schema, and rich annotations, the description is complete enough for correct invocation. It covers purpose, routing to alternatives, safety, determinism, and operational limits; return formatting is already handled by the output schema.

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 input schema already documents k, unit, origin, candidates, and max_distance thoroughly. The description mentions k nearest results but does not add syntax, edge-case, or format details beyond the schema; baseline 3 applies.

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: ranks candidate points by distance from an origin and returns the k nearest with distances and indices. Explicitly distinguishes itself from geo-haversine, so an agent can route between these sibling tools 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 Guidelines5/5

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

Provides explicit 'When' and 'Not for' sections. The 'Not for' clause names the alternative tool, geo-haversine, and the precise condition that should route to it.

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