Skip to main content
Glama

Find Postal Codes

find_postal_codes
Read-onlyIdempotent

Look up postal/ZIP codes and places by each other. Pass "postal_code" (+ country) to find the place(s) a code maps to ("what city is ZIP 90210"); or pass "place" (+ country) to find the postal codes for a place name ("postal codes for Paris"). Returns place name, country, admin region (state/county), postal code, and coordinates.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "country": "US",
      "postal_code": "90210"
    },
    "name": "find_postal_codes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 10, max 100).
placeNoPlace name to find postal codes for (e.g. "Paris", "Springfield"). Use instead of postal_code.
_apiKeyYesGeoNames username
countryNoISO 3166-1 alpha-2 country code (e.g. "US", "FR"). Strongly recommended, codes and place names repeat across countries.
postal_codeNoPostal/ZIP code to look up (e.g. "90210", "75001"). Provide country for accuracy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO 3166-1 alpha-2 country code (e.g. \"US\", \"FR\"). Strongly recommended — codes and place names repeat across countries."New value: +"ISO 3166-1 alpha-2 country code (e.g. \"US\", \"FR\"). Strongly recommended, codes and place names repeat across countries."
  2. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "_apiKey": "your-geonames-api-key",
      -    "country": "US",
      -    "postal_code": "90210"
      -  },
      -  {
      -    "_apiKey": "your-geonames-api-key",
      -    "country": "FR",
      -    "place": "Paris"
      -  }
      -]New value: +[
      +  {
      +    "country": "US",
      +    "postal_code": "90210"
      +  },
      +  {
      +    "country": "FR",
      +    "place": "Paris"
      +  }
      +]
  3. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "_apiKey": "your-geonames-api-key",
      +    "country": "US",
      +    "postal_code": "90210"
      +  },
      +  {
      +    "_apiKey": "your-geonames-api-key",
      +    "country": "FR",
      +    "place": "Paris"
      +  }
      +]
  4. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this as a read-only, idempotent, non-destructive open-world lookup, so the safety profile is covered. The description adds value beyond that by spelling out the return fields (place name, country, admin region, postal code, coordinates), which matters because no output schema exists. It does not say what happens if both resolution keys are supplied, nor how no-match results are reported.

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?

Three sentences, front-loaded with the bidirectional framing and then the two modes, with no padding. The parenthetical example queries earn their place by disambiguating the modes, though the sentence is somewhat dense with nested parentheses.

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 explicit enumeration of returned fields is important and present, and the annotations handle the safety profile. Minor gaps remain around ambiguous or empty results and the effect of limit on result selection, but an agent has enough to call the tool correctly.

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 the baseline is 3. The description restates the postal_code/place mutual exclusivity and the country recommendation that the schema already documents, adding little new meaning beyond emphasizing the pairings in prose.

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 a specific verb and resource (look up postal codes and places) and crisply describes the two lookup directions, making the tool's function unmistakable. It does not contrast itself with neighbouring tools such as geonames_get_timezone or get_nearby, so it falls short of full sibling differentiation.

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?

It gives concrete when-to-use guidance through worked phrasings: pass postal_code (+ country) for 'what city is ZIP 90210', or place (+ country) for 'postal codes for Paris'. What is missing is any exclusion guidance — e.g. when to prefer a coordinate-based or timezone tool instead.

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.