Skip to main content
Glama

Nearest features and distances

proximity
Read-onlyIdempotent

Find the nearest mapped feature of each requested type to one US point or address, from about 50 types in 7 categories: power (substation, transmission_line, power_plant, solar_facility), pipelines, transportation (major_road, rail_line, airport), places (hospital, school, fire_station), water (wetland, dam, coast), environment (superfund, brownfield) and telecom. fetch_location returns non-distance facts at the point; ask may call this tool. Selection: features and categories combine (synonyms such as 'power line' or 'cell tower' work); with neither, 14 default types are used. Output: features nearest first, each with type, label, category, status, straight-line distance_m/km/mi, source, name, attributes and counts where published, and within_radius when radius_m is given. Distances come from public datasets, not a survey. Cost: 1 lookup per call covering up to 50 underlying fields (radius counts are dropped first if more are needed); nothing when no data returns. Behavior: read-only (no side effects); needs an API key or OAuth; each call counts toward the per-minute request limit (Free 10, Starter 60, Pro 300); a cold point can take up to 120 s, and calls over 2 s count toward the slow-lookup limit (Free 5, Starter 20, Pro 60 per minute). A type whose source fails has status failed with error and retryable; a type with no data is listed in unavailable_types. Errors: invalid_locator, coord_out_of_bounds, proximity_type_unknown (lists unknown names and known categories). Plan limits return rate_limited (with retry_after_s), daily_cap_reached or quota_exhausted.

Input Schema

NameRequiredDescriptionDefault
latNoWGS84 latitude in decimal degrees (e.g. 30.2672), paired with lng. Give lat+lng or address, exactly one of the two.
lngNoWGS84 longitude in decimal degrees (e.g. -97.7431, negative in the US), paired with lat.
addressNoUS street address with city and state (e.g. '350 5th Ave, New York, NY'), geocoded by the US Census geocoder along the street. An alternative to lat+lng; giving both is an invalid_locator error.
featuresNoFeature types (e.g. ['substation', 'transmission_line', 'hospital']); case-insensitive, spaces or hyphens allowed, common synonyms accepted. About 20 types fit in one call.
radius_mNoOptional radius in meters (up to 500000); each feature is flagged within_radius true or false. Does not limit the search.
categoriesNoWhole categories, any of: power, pipelines, water, transportation, places, environment, telecom. Added to features.
max_wait_sNoOptional; accepted for consistency with fetch_location but not applied here: a proximity call waits up to 120 s for its sources.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, yet the description adds substantial context beyond them: API key/OAuth requirement, per-minute and slow-lookup rate limits by tier, 1-lookup-per-call cost accounting, 120s cold-start latency, partial-failure semantics (status failed with retryable, unavailable_types), and a full error taxonomy. It stops short of describing pagination or ordering guarantees beyond 'nearest first', but the behavioral disclosure is well above the annotation baseline.

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?

Front-loaded with purpose, then organized into Selection/Output/Cost/Behavior/Errors blocks, all of which earn their place for a tool with this much behavior. It is dense and a few clauses (e.g. radius flagging) restate schema text, keeping it from a 5, but there is little true filler.

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?

With no output schema, the description carries the return-shape burden and does so: nearest-first ordering, per-feature fields (type, label, category, status, distance in m/km/mi, source, name, attributes, within_radius), plus partial-failure and error handling. Given 7 params and a rich behavioral surface, nothing an agent needs to call it correctly is missing.

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, but the description adds real semantics the schema does not: how features and categories combine, that neither yields 14 defaults, and that synonyms are resolved. It also reinforces that radius_m flags rather than filters. These additions justify moving above baseline.

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?

Opens with a specific verb+resource: 'Find the nearest mapped feature of each requested type to one US point or address', and enumerates the 7 categories so an agent knows the scope immediately. It also distinguishes itself from the sibling fetch_location by stating that fetch_location returns non-distance facts at the point.

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?

Explicitly routes between siblings ('fetch_location returns non-distance facts...; ask may call this tool') and gives selection rules for its own inputs: features and categories combine, synonyms are accepted, and 14 default types apply when neither is given. The conditions that select this tool versus alternatives are stated, not implied.

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