Skip to main content
Glama

Postal code lookup

lookup_postal_code
Read-onlyIdempotent

The places of a postal code (GeoNames); case, spaces and hyphens in the code are ignored. partial is true for the countries GeoNames gives only in part (CA, NL, GB: first part; CL, CN, AR: first digits; IE, MT: first letters; BR: major codes). 503 NOT_READY on a dataset built before the feature. Needs an API key: the MCP client sends Authorization: Bearer <key>.

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>",
      "code": "<code>"
    },
    "name": "lookup_postal_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesPostal code to look up, up to 20 characters.
limitNoDefault 100
offsetNoNumber of results to skip for pagination, from 0 to 10000.
countryYesISO 3166-1 alpha-2 country code, e.g. TR.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / code / description
      Added value: +"Postal code to look up, up to 20 characters."
    • addedInput schema / properties / country / description
      Added value: +"ISO 3166-1 alpha-2 country code, e.g. TR."
    • addedInput schema / properties / offset / description
      Added value: +"Number of results to skip for pagination, from 0 to 10000."
  2. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and closed-world behavior, and the description still adds substantial context beyond them: input normalization (case, spaces, hyphens ignored), the meaning and country-specific shape of the `partial` flag, a specific 503 NOT_READY failure mode when the dataset predates the feature, and the Bearer auth requirement. These are exactly the operational details an agent cannot infer from structured fields.

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 purpose and the input-normalization rule are front-loaded, and each subsequent sentence carries distinct information (partial semantics, error code, auth). The parenthetical country taxonomy for `partial` is dense and slightly list-like, but it is genuinely informative rather than filler.

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?

With no output schema, the description carries some burden for return values; it explains the `partial` flag but does not describe the returned place records or that results are a paginated list. Combined with the auth, error, and normalization details, it is complete enough for correct invocation, with a modest gap on result shape.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented in the schema, setting a baseline of 3. The description does add meaning for `code` by stating that case, spaces, and hyphens are ignored during matching — a normalization rule absent from the schema — but it says nothing about `limit` or `offset` behavior beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource precisely (the places of a postal code, sourced from GeoNames) and an agent can immediately tell this is a code-to-places lookup rather than a proximity search like find_nearby_postal_codes. It stops short of an explicit verb-plus-scope statement or a named contrast with a sibling, which keeps it at 4 rather than 5.

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 only implied: the tool is clearly for resolving a known postal code, and the `partial` explanation hints at when results may be incomplete. There is no explicit when-to-use or when-not-to-use guidance and no routing to an alternative such as a nearby-places search when only an approximate location is known.

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