Skip to main content
Glama

Every ZIP code or postcode within a radius

find_postcodes_in_radius
Read-onlyIdempotent

Every US ZIP code, or every UK postcode sector (or district), whose centre is within a radius of a place, nearest first with the distance. The centre can be a ZIP, a UK postcode, sector or district, an address, or "lat,lng". For service areas, delivery zones, direct-mail and ad targeting lists. Straight-line distance between centres (an area counts when its centre is inside). Free: our own copy of the Census ZIP centres and the UK postcode centres. The answer has a run_id: write it into a sheet or map it (render_map from_run). For "who on MY list is within X miles", use filter_by_location instead. Set render to true only when the user wants to keep or share the map: it returns a link, GeoJSON and KML, and update_map can change it later.

Input Schema

NameRequiredDescriptionDefault
unitNomi
limitNoMost areas to list, nearest first (up to 2,500); the total found is always given.
titleNo
centerYesA ZIP ("10001"), a UK postcode, sector or district ("SW1A 1AA", "SW1A 1", "SW1A"), an address, or "lat,lng".
radiusYesUp to 500 miles or 800 km.
renderNo
countryNoOptional: worked out from the centre.
granularityNoUK only: postcode sectors ("SW1A 1") or districts ("SW1A").sector

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: it discloses the distance metric (straight-line between centres), the counting rule (an area counts when its centre is inside), data provenance ('our own copy of the Census ZIP centres and the UK postcode centres'), and the run_id workflow with render returning a link plus GeoJSON and KML. That is rich behavioral context an agent cannot get from the annotations.

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 what the tool returns, then usage, then the sibling routing rule and the render caveat. Most sentences earn their place, though the pricing/provenance aside ('Free: our own copy…') and the render sentence could be tightened without losing decision-relevant information.

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: nearest-first results with distance, a total count, and a run_id that can be written to a sheet or rendered, plus the render payload. Combined with the routing rule to filter_by_location, an agent has everything needed to call it correctly.

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 63%, so some parameters (unit, title, country, radius, limit) rely on the schema alone, but the description adds meaning where it matters most: render's side effects ('returns a link, GeoJSON and KML, and update_map can change it later') and the centre-input taxonomy. It is partly redundant with the center/granularity schema descriptions, so it is additive rather than fully compensating.

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 resource (US ZIP codes / UK postcode sectors or districts) with a precise scope qualifier (centres within a radius of a place, nearest first with distance). It also names the sibling it is not (filter_by_location) and the downstream tools it feeds (render_map, update_map), so an agent can place it without opening any 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?

Gives concrete use cases (service areas, delivery zones, direct-mail and ad targeting lists) and an explicit routing rule: 'For "who on MY list is within X miles", use filter_by_location instead.' It also conditions the optional render flag ('set render to true only when the user wants to keep or share the map'), which is exactly the when-to-use decision an agent must make.

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