Skip to main content
Glama

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

Validate a US address

validate_address
Read-onlyIdempotent

Validate and standardise a US street address and return its ZIP+4. US ONLY — unlike the postal-code tools, this does not cover Canada. Send the address on one line in mailing order: number and street, then any unit (APT 4, STE 900, #9), then city, state and ZIP. It tolerates ordinary slips (a misspelling, a missing ZIP, state or directional), but it is not a puzzle to solve: a unit placed after the city or ZIP ("Pensacola FL #9") is ambiguous, a unit or a floor. Send what the user gave you, in proper order, once. If it does not match, report that; do not keep trying rewrites. Returns the address in USPS standard form split into its parts, the 5-digit ZIP and the +4 add-on, a confidence level of high, medium or low (low: the +4 may be withheld), and the county, carrier route, congressional district and census block group for the match, all for one credit. include appends more, one credit each: coordinates, the census geographies the address sits inside, its congressional and state legislative districts (now or as of any TIGER/Line year served), its school district, its time zone, and American Community Survey profiles for its census tract. The congressional district already in details is USPS's own code for the record; the cd append is the mapped district, with its number, name and the congress it belongs to. Always read notices. ZIP_CORRECTED means the match is in a different ZIP than the one supplied. SECONDARY_NEEDED means the building has multiple units and an apartment or suite number should be requested. SECONDARY_NOT_VERIFIED means a supplied unit could not be confirmed against known ranges. PARTIAL_MATCH means some details are unverified. A failed match returns success false, sometimes with no notice explaining why, so check success rather than assuming the data block is populated. Without an API key the standardised address is returned with the +4 masked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>"
    },
    "name": "validate_address"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesThe address on one line. A city and state, or a ZIP Code, helps but neither is required — '1600 Pennsylvania Ave NW, Washington DC' and '1600 Pennsylvania Ave NW 20500' both resolve. Between 9 and 300 characters once spacing is normalised.
api_keyNoYour ZIP-Codes.com API key, only when you cannot send it as the X-Api-Key or Authorization: Bearer header (for example a key bought with buy_credits in this conversation). Leave it out to use the free tier. It is never shown back in a response.
includeNoData to append to the match, spelled exactly as the REST API's /v2/address include flags, each costing one extra credit. 'coordinates' adds the latitude and longitude. 'census' adds the county, county subdivision, place, tract, block group and CBSA the address falls in; 'cd' adds its congressional district; 'state_leg' adds its upper and lower state legislative districts; 'school_district' adds its school district; 'timezone' adds the time zone at the matched point. census_YYYY, cd_YYYY and state_leg_YYYY add those boundaries as of a TIGER/Line year (the bare flag is the newest year, answered under `current`; other years under their own key). The 'acs_tract_*' values add an American Community Survey 5-year profile for the address's census tract: four profiles (demographic, social, economic, housing), unsuffixed for the current release or acs_tract_PROFILE_YYYY for an earlier one, in one schema, so a tract can be compared across years. At most 16 ACS profile-years per call (one profile for one year is one); split a larger request into several calls. Accepted: coordinates, census, cd, state_leg, school_district, timezone, acs_tract_demographic, acs_tract_social, acs_tract_economic, acs_tract_housing; census_YYYY, cd_YYYY, state_leg_YYYY for YYYY 2010-2026; acs_tract_demographic_YYYY, acs_tract_social_YYYY, acs_tract_economic_YYYY, acs_tract_housing_YYYY for YYYY 2011-2024. A bare flag is its newest year.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / include / description
      Previous value: -"Data to append to the match, spelled exactly as the REST API's /v2/address include flags, each costing one extra credit. 'coordinates' adds the latitude and longitude. 'census' adds the county, county subdivision, place, tract, block group and CBSA the address falls in; 'cd' adds its congressional district; 'state_leg' adds its upper and lower state legislative districts; 'school_district' adds its school district; 'timezone' adds the time zone at the matched point. census_YYYY, cd_YYYY and state_leg_YYYY add those boundaries as of a TIGER/Line year (the bare flag is the newest year, answered under `current`; other years under their own key). The 'acs_tract_*' values add an American Community Survey 5-year profile for the address's census tract: four profiles (demographic, social, economic, housing), unsuffixed for the current release or acs_tract_PROFILE_YYYY for an earlier one, in one schema, so a tract can be compared across years. Accepted: coordinates, census, cd, state_leg, school_district, timezone, acs_tract_demographic, acs_tract_social, acs_tract_economic, acs_tract_housing; census_YYYY, cd_YYYY, state_leg_YYYY for YYYY 2010-2026; acs_tract_demographic_YYYY, acs_tract_social_YYYY, acs_tract_economic_YYYY, acs_tract_housing_YYYY for YYYY 2022-2024. A bare flag is its newest year."New value: +"Data to append to the match, spelled exactly as the REST API's /v2/address include flags, each costing one extra credit. 'coordinates' adds the latitude and longitude. 'census' adds the county, county subdivision, place, tract, block group and CBSA the address falls in; 'cd' adds its congressional district; 'state_leg' adds its upper and lower state legislative districts; 'school_district' adds its school district; 'timezone' adds the time zone at the matched point. census_YYYY, cd_YYYY and state_leg_YYYY add those boundaries as of a TIGER/Line year (the bare flag is the newest year, answered under `current`; other years under their own key). The 'acs_tract_*' values add an American Community Survey 5-year profile for the address's census tract: four profiles (demographic, social, economic, housing), unsuffixed for the current release or acs_tract_PROFILE_YYYY for an earlier one, in one schema, so a tract can be compared across years. At most 16 ACS profile-years per call (one profile for one year is one); split a larger request into several calls. Accepted: coordinates, census, cd, state_leg, school_district, timezone, acs_tract_demographic, acs_tract_social, acs_tract_economic, acs_tract_housing; census_YYYY, cd_YYYY, state_leg_YYYY for YYYY 2010-2026; acs_tract_demographic_YYYY, acs_tract_social_YYYY, acs_tract_economic_YYYY, acs_tract_housing_YYYY for YYYY 2011-2024. A bare flag is its newest year."
    • changedInput schema / properties / include / items / pattern
      Previous value: -"^(coordinates|census|cd|state_leg|school_district|timezone|acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing|(census|cd|state_leg)_(201\\d|202[0-6])|(acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing)_202[2-4])$"New value: +"^(coordinates|census|cd|state_leg|school_district|timezone|acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing|(census|cd|state_leg)_(201\\d|202[0-6])|(acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing)_(201[1-9]|202[0-4]))$"
  2. Changed3 schema fields changed
    • addedInput schema / properties / api_key
      Added value: +{
      +  "default": null,
      +  "description": "Your ZIP-Codes.com API key, only when you cannot send it as the X-Api-Key or Authorization: Bearer header (for example a key bought with buy_credits in this conversation). Leave it out to use the free tier. It is never shown back in a response.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / include / description
      Previous value: -"Data to append to the match, spelled exactly as the REST API's /v2/address include flags, each costing one extra credit. 'coordinates' adds the latitude and longitude. 'census' adds the county, county subdivision, place, tract, block group and CBSA the address falls in; 'cd' adds its congressional district; 'state_leg' adds its upper and lower state legislative districts; 'school_district' adds its school district; 'timezone' adds the time zone at the matched point. census_YYYY, cd_YYYY and state_leg_YYYY add those boundaries as of a TIGER/Line year (the bare flag is the newest year, answered under `current`; other years under their own key). The 'acs_tract_*' values add an American Community Survey 5-year profile for the address's census tract: four profiles (demographic, social, economic, housing), unsuffixed for the current release or acs_tract_PROFILE_YYYY for an earlier one, in one schema, so a tract can be compared across years. Accepted: coordinates, census, cd, state_leg, school_district, timezone, acs_tract_demographic, acs_tract_social, acs_tract_economic, acs_tract_housing; census_YYYY, cd_YYYY, state_leg_YYYY for YYYY 2010-2025; acs_tract_demographic_YYYY, acs_tract_social_YYYY, acs_tract_economic_YYYY, acs_tract_housing_YYYY for YYYY 2022-2024. A bare flag is its newest year."New value: +"Data to append to the match, spelled exactly as the REST API's /v2/address include flags, each costing one extra credit. 'coordinates' adds the latitude and longitude. 'census' adds the county, county subdivision, place, tract, block group and CBSA the address falls in; 'cd' adds its congressional district; 'state_leg' adds its upper and lower state legislative districts; 'school_district' adds its school district; 'timezone' adds the time zone at the matched point. census_YYYY, cd_YYYY and state_leg_YYYY add those boundaries as of a TIGER/Line year (the bare flag is the newest year, answered under `current`; other years under their own key). The 'acs_tract_*' values add an American Community Survey 5-year profile for the address's census tract: four profiles (demographic, social, economic, housing), unsuffixed for the current release or acs_tract_PROFILE_YYYY for an earlier one, in one schema, so a tract can be compared across years. Accepted: coordinates, census, cd, state_leg, school_district, timezone, acs_tract_demographic, acs_tract_social, acs_tract_economic, acs_tract_housing; census_YYYY, cd_YYYY, state_leg_YYYY for YYYY 2010-2026; acs_tract_demographic_YYYY, acs_tract_social_YYYY, acs_tract_economic_YYYY, acs_tract_housing_YYYY for YYYY 2022-2024. A bare flag is its newest year."
    • changedInput schema / properties / include / items / pattern
      Previous value: -"^(coordinates|census|cd|state_leg|school_district|timezone|acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing|(census|cd|state_leg)_(201\\d|202[0-5])|(acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing)_202[2-4])$"New value: +"^(coordinates|census|cd|state_leg|school_district|timezone|acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing|(census|cd|state_leg)_(201\\d|202[0-6])|(acs_tract_demographic|acs_tract_social|acs_tract_economic|acs_tract_housing)_202[2-4])$"
  3. Changed1 schema field changed
    • addedInput schema / properties / address / type
      Added value: +"string"
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish a safe, idempotent, non-open-world read, and the description goes well beyond them: it discloses the credit model (one credit base, one per include, 16 ACS profile-year cap), the meaning of each notice code, that a failed match returns success false sometimes with no notice, and that without an API key the +4 is masked. That is exactly the operational context an agent needs before calling.

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 and scope, then input format, then return shape, then notice semantics, then failure handling — a sensible progression. It is dense and long, and the trailing enumeration of accepted include flags duplicates the schema's pattern and description, which is the main place wording could be trimmed.

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 full burden of explaining the response and it does: standardised parts, 5-digit ZIP and +4, confidence tiers with the caveat that low may withhold the +4, the detail fields, and what each include appends. Failure modes and keyless behaviour are also covered, leaving nothing material unstated for a three-parameter tool.

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; the description earns more by clarifying semantics the schema does not, notably that the `cd` append is the mapped district with number, name and congress whereas the congressional district in `details` is USPS's own record code. It also reinforces the cross-year and per-flag credit cost, though it largely restates the accepted-flag enumeration already present in the schema.

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 verb and resource — validate and standardise a US street address, returning ZIP+4 — and immediately scopes it apart from the postal-code siblings with 'US ONLY — unlike the postal-code tools, this does not cover Canada.' An agent can distinguish this from zip_lookup or quick_zip 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 Guidelines4/5

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

Gives concrete input guidance (one line, mailing order, unit placement), states what slips are tolerated, and explicitly says not to retry rewrites: 'If it does not match, report that; do not keep trying rewrites.' The only gap is that it refers to 'the postal-code tools' generically rather than naming which sibling to use for Canadian or ZIP-only lookups.

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.