Skip to main content
Glama

Postal codes and places

Look up a postal code

lookup_postal_code
Read-onlyIdempotent

Which places does a postal code / ZIP code / postcode / PIN code / PLZ / CEP cover, and which state, province, county or district are they in? Returns every place name for the code with its first-, second- and third-level administrative units and coordinates. 124 countries (GeoNames). Accepts common input forms (e.g. "SW1A 1AA" maps to the outward code SW1A, "K1A 0B1" to K1A, ZIP+4 to the 5-digit ZIP, "1000001" to JP 100-0001).

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": {
      "country": "<country>",
      "postal_code": "<postal_code>"
    },
    "name": "lookup_postal_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
countryYesCountry as an ISO 3166-1 alpha-2 code (AU, US, GB, DE, IN, PH, ...) or an English country name.
postal_codeYesThe postal code as written locally, e.g. 3220, 90210, 10115, 560001, SW1A 1AA, 100-0001.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world, so the safety profile is covered; the description adds real context beyond that: a GeoNames dataset of 124 countries and, importantly, input normalization behavior ('SW1A 1AA' → outward code SW1A, ZIP+4 → 5-digit ZIP), which an agent could not infer from annotations. It also describes the return contents, which matters since there is no output schema. What is missing is any statement of failure behavior for unknown codes.

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?

Two sentences, front-loaded with the capability question, then the return shape, coverage, and accepted input forms. The long synonym chain ('postal code / ZIP code / postcode / PIN code / PLZ / CEP') is slightly verbose but earns its place for terminology matching.

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?

For a two-parameter, read-only lookup with no output schema, the description covers coverage scope, input normalization, and return fields, which is nearly everything an agent needs. Only the not-found / invalid-country behavior is unaddressed.

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 3 is the baseline, but the description adds meaning beyond the schema by specifying which input forms the postal_code field tolerates and how they are truncated (outward code, 5-digit ZIP, JP 100-0001), which the schema only hints at with examples.

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 precise question the tool answers ('Which places does a postal code cover, and which state, province, county or district are they in?') and names the returned fields: place names, first/second/third-level administrative units, coordinates. It is clearly a lookup, not a search, which distinguishes it from the sibling find_place.

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?

Usage is implied strongly by the framing question — you have a postal code and want its places/admin units — but there is no explicit when-to-use statement, no exclusion, and no reference to the find_place sibling as the alternative for the reciprocal lookup.

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