Skip to main content
Glama

nearest_features

Find the n nearest cities or airports to a latitude/longitude coordinate to answer nearest-place questions; geocode the location first.

Instructions

The n nearest places to a point. kind can be "city" or "airport".

Use for "closest" or "nearest" questions. Get the point from geocode first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lat": "<lat>",
      "lon": "<lon>"
    },
    "name": "nearest_features"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
latYes
lonYes
kindNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the allowed kind values and a workflow dependency on geocode, but says nothing about result ordering, n limits, or what happens when kind is null (the schema default) — that last one matters since the default is unconstrained.

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?

Three short sentences, front-loaded with the core purpose, with zero filler. The only weakness is format: it reads as sentence fragments with a stray line break, which is terse to the point of being slightly clipped rather than polished.

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?

Given an output schema exists (so return values need no explanation) and only four simple parameters, the definition covers purpose, trigger, prerequisite, and the one non-obvious enum. Remaining omissions (n bounds, null-kind behavior, coordinate format) are modest but real.

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 coverage is 0%, so the description must compensate, and it partly does: it defines kind's legal values (city or airport) and ties n to "nearest places" while pointing lat/lon at geocode output. It does not specify coordinate format/precision, an upper bound on n, or what a null kind means, leaving real gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-and-resource combination (return the n nearest places to a point) and identifies what the results are (places, filtered by kind). It does not explicitly contrast with siblings such as features_within or point_in_polygon, so an agent must infer the distinction from those tools' own descriptions.

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 concrete trigger language ("Use for 'closest' or 'nearest' questions") plus a required prior step ("Get the point from geocode first"), which is exactly the kind of prerequisite an agent needs. It stops short of stating when not to use it, e.g. versus features_within for radius searches, so no explicit alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.