Skip to main content
Glama

Postal code lookup

lookup_postal_code
Read-onlyIdempotent

Look up a postal code or US ZIP code. Returns every locality that carries the code with its city, county/administrative division, region (state, département, wilaya…), coordinates, IANA time zone, US telephone area codes, USDA 2023 plant hardiness / planting zone (e.g. 7b with its temperature band), and US Census demographics (population, density and land area, median household and per-capita income, median age, households, housing units, median home value, median gross rent — measured for the ZCTA, the Census approximation of the ZIP area). Each record lists its sources and a verification status (cross-checked | source-single | conflict | unverified); on conflict, alternate_codes gives the competing values and their sources — never pick one silently; tell the user both. Curated coverage (full records): United States (ZIP), Germany, Austria, Spain, France, Algeria, Tunisia, Morocco. All other countries (~115 more: GB, CA, IN, JP, MX, BR…) return bulk-tier records — place name, admin areas and coordinates from GeoNames, marked tier: "bulk" and single-source, without demographics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe postal / ZIP code exactly as written, e.g. "90210", "75001", "16000"
countryYesISO 3166-1 alpha-2 code: US, FR, DZ, TN or MA

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 declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds substantial behavioral context: the verification status values, the conflict handling rule ('never pick one silently; tell the user both'), the tier distinction between curated and bulk records, and the fact that bulk records lack demographics. This goes well beyond 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?

The description is dense but well-organized: it front-loads the core purpose, then details the return fields, then coverage tiers, then conflict handling. Every sentence adds information. It is longer than average, but the length is justified by the tool's rich output and the need to explain the curated vs bulk distinction. Slight redundancy with the schema's country description, but not enough to lose a point.

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?

For a read-only lookup tool with two fully documented parameters and no output schema, the description is remarkably complete. It explains what fields come back, how to interpret verification status, how to handle conflicts, and what to expect for different countries. An agent can call this tool correctly and interpret its results without additional context.

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 description coverage is 100%, so the schema already documents both parameters. The description adds value by giving concrete examples ('90210', '75001', '16000') and clarifying that the code should be 'exactly as written'. It also explains the country parameter's ISO alpha-2 format, though the schema already states that. The description doesn't add much beyond the schema, but the examples and exact-match guidance are useful.

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 states a specific verb ('Look up') and resource ('postal code or US ZIP code'), and enumerates the exact fields returned. It distinguishes itself from siblings like area_code_lookup and nearby_places by clarifying it returns localities, time zones, area codes, and demographics for a postal code.

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?

The description explicitly explains when to use this tool (lookup by postal/ZIP code) and contrasts it with the sibling area_code_lookup by noting it returns US telephone area codes as part of the record. It also gives coverage guidance: curated full records for specific countries, bulk-tier records for others, and instructs the agent to tell the user both values on conflict rather than silently picking one.

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