Skip to main content
Glama

ZIP Code Distance Match

zipcode_distance_match
Read-onlyIdempotent

Returns every pair of ZIP codes whose distance is ≤ a threshold, given a list of codes and a country.

Instructions

Find all pairs of ZIP codes within a given distance threshold. All codes must be in the same country. Returns every pair (code_1, code_2) whose distance is ≤ the threshold.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codesYesList of ZIP/postal codes to find close pairs within. Example: ["10001", "10002", "10003", "11201"]
countryYesISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE').
distanceNoMaximum distance threshold for pairing. Default: 100 (in the selected unit).
unitNoDistance unit. Default: km. Options: km, mi, yd, m, ft, in.km
Behavior4/5

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

Annotations already indicate read-only, idempotent, and non-destructive. The description adds that it returns every pair meeting the threshold, providing a completeness guarantee beyond annotations. No contradictions.

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?

Two sentences, front-loaded with the action and key constraint. No unnecessary words; every sentence adds essential information.

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 4 parameters fully described in the schema and no output schema, the description explains the return behavior (all pairs) and the country constraint. It is sufficient for an agent to understand the tool, though it does not mention potential result size.

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 baseline is 3. The description adds no new parameter-level detail beyond what the schema already provides (e.g., country constraint is implied by the country parameter).

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 clearly states the tool finds all pairs of ZIP codes within a distance threshold, using a specific verb (find) and resource (pairs of ZIP codes). It distinguishes from siblings like zipcode_distance (two specific codes) and zipcode_radius_search (single code radius).

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 includes a constraint (all codes must be in the same country) but provides no explicit when-to-use vs alternatives. Usage is implied by the purpose, but no guidance on when to prefer this over sibling tools like zipcode_distance or zipcode_radius_search.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/api-freaks/apifreaks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server