Skip to main content
Glama

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

Radius search

radius_search
Read-onlyIdempotent

Find every US ZIP Code and Canadian postal area within a radius of a centre point, with the distance to each. The centre takes a US ZIP Code, a US ZIP+4, a Canadian FSA, a Canadian postal code, or a latitude,longitude pair; a ZIP+4 searches from its parent ZIP, and coordinates are used as the point itself, so the centre comes back with no code. Centroid mode measures centre to centre and reaches 500 miles; spatial mode intersects real boundaries, reports how much of each area falls inside, and reaches 250 miles. Set a minimum radius to search a ring rather than a circle. summary.total_count is the number of matches returned; when the list is cut, summary.total_available is the number in the radius and a notice says so. ACS statistics always cover the whole radius. They are aggregates of the ZIP Codes' estimates: est and pct only, with no margin of error or Census column; for one ZIP Code's estimate with its margin of error, use zip_lookup. timezone and ACS come back with the search itself; only census and district data need zip_lookup per ZIP. Without an API key the count and a sample of matches are returned and the rest is withheld; free-tier keys are capped at 100 miles centroid and 50 spatial.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxYesRadius in miles, as a number or a string. Up to 500 in centroid mode or 250 in spatial mode; exceeding the cap is an error rather than being reduced. May also be 'auto' to pick a radius from local population density, or 'auto-commute' to use commuting patterns where available.
minNoMinimum radius in miles, to exclude the middle and search a ring. Must be less than max. Defaults to 0.
codeYesCentre point: a US ZIP Code, ZIP+4, Canadian FSA or postal code, or a latitude,longitude pair.
modeNoHow to measure. centroid measures centre to centre and is the default when omitted; spatial intersects actual boundaries and adds how much of each area lies inside, at a lower maximum radius.
limitNoMaximum number of matches to return, up to 100, which is also the default. A larger value is reduced to 100 and the result says so in notices. When the list is cut, summary.total_available is the number of matches in the radius (summary.total_count is the number returned) and a RESULTS_CAPPED notice says so; to see matches beyond the first 100, narrow the radius or raise `min` to step outwards in bands.
includeNoEnrichments, spelled as the REST API's /v2/radius include flags; each multiplies the credit cost. timezone lands on each match. acs_PROFILE (current release) and acs_PROFILE_YYYY return aggregate statistics across the whole result set, with the same field paths every year. Census and district enrichments are not available here; use zip_lookup. Accepted: timezone, acs_demographic, acs_social, acs_economic, acs_housing; acs_demographic_YYYY, acs_social_YYYY, acs_economic_YYYY, acs_housing_YYYY for YYYY 2011-2024. A bare flag is its newest year.
acs_yearsNoAlias, kept for clients that learned it before include took year flags: ACS release years for the bare acs_ profiles in include (acs_social with acs_years [2015] is acs_social_2015). Prefer the year flags in include. At most 16 profile-years per call. 2011 to 2024 (2024 is the current release).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld; the description adds the substantive behavior: radius caps (500 centroid, 250 spatial), per-flag credit multiplication, no-API-key behavior (count plus sample, rest withheld), free-tier caps (100/50 miles), RESULTS_CAPPED notices, and the total_count vs total_available distinction.

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

Conciseness3/5

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

Front-loaded with the purpose and behaviourally rich, but it is very long and re-states much of what the already-exhaustive schema descriptions cover (mode, limit cap, include flags, acs_years alias), so a meaningful share of the text is redundant rather than additive.

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 and 7 parameters, the description still explains return semantics (summary.total_count/total_available, notices, timezone and ACS arriving with the search, ACS aggregates covering the whole radius) and the degraded no-key response, so an agent has what it needs to call and interpret results.

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 genuine meaning beyond the schema: a ZIP+4 searches from its parent ZIP, coordinates are the point itself so no centre code is returned, and ACS flags aggregate the whole radius with est/pct only (no margin of error).

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 precise verb+resource+scope: 'Find every US ZIP Code and Canadian postal area within a radius of a centre point, with the distance to each.' It also names the sibling it is not (zip_lookup) for single-ZIP estimates, so an agent can route without opening schemas.

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 to alternatives in both directions: use zip_lookup for one ZIP's estimate with margin of error, and for census/district enrichments that are unavailable here. It also gives selection criteria for centroid vs spatial mode, min-radius ring searching, and how to step beyond the 100-match cap.

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.