Skip to main content
Glama

Zip-Codes.com Location Intelligence: Spatial Analysis, Districts & 14+ Years of Demographics

Distance between two places

distance
Read-onlyIdempotent

Distance between two places, in miles and kilometres, plus the compass bearing from the first to the second. Each end takes a US ZIP Code, a US ZIP+4, a Canadian FSA, a Canadian postal code, or a latitude,longitude pair, and the two ends can be different kinds — a US ZIP to a Canadian postal code works, and so does a code to a coordinate. Time zone for both ends is included. This is a straight-line distance, not a driving route. Without an API key the distance itself is returned and the geography behind it is withheld.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination, in any of the same forms as the origin.
fromYesOrigin: a ZIP Code, ZIP+4, Canadian FSA or postal code, or latitude,longitude. For example 90210, M5V 2T6, or 34.10,-118.41.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld), so the description's added value is the straight-line-vs-driving-route caveat and the explicit API-key degradation behavior (distance returned but underlying geography withheld). That auth/behavior disclosure goes beyond the structured fields, though error handling for invalid codes is not addressed.

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

Conciseness5/5

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

Four tight sentences, front-loaded with what the tool returns; input forms, the straight-line caveat, and the API-key caveat each follow in logical order. No sentence is 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?

There is no output schema, so the description carries the return-value burden and does so: distance in both unit systems, bearing, time zones for both ends, and what is withheld without an API key. Nothing an agent needs in order to call and interpret this tool 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 schema already documents 'from' and 'to' with examples, setting the baseline at 3. The description earns an extra point by clarifying a rule the schema does not state — the two ends may be of different kinds (US ZIP to Canadian postal code, code to coordinate) — which prevents a reasonable misreading of 'same forms as the origin.'

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?

The description names the exact computation (straight-line distance in miles and kilometres plus compass bearing between two locations) and the units, so an agent knows precisely what it gets back. This distinguishes it from reference siblings like zip_lookup or validate_address, and the scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description establishes context (point-to-point distance, not a driving route) and enumerates the accepted input forms, including that the two ends may be different kinds. However, it never says when to choose this over radius_search or suggest_places, so the routing guidance is only 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.