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.

Input Schema

TableJSON 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 / 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"
      +  }
      +]
  2. 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"
      +  }
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, idempotent, and non-destructive behavior. The description adds useful behavioral context by specifying the returned fields (place name, country, admin region, postal code, coordinates), which is especially valuable since there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single well-structured paragraph that front-loads the core purpose, then explains the two modes with examples. Every sentence earns its place and there is no redundant filler.

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?

Given the bidirectional lookup complexity, rich schema (100% coverage), complete annotations, and no output schema, the description covers what the tool does, how to invoke it in both modes, and what it returns. Nothing critical for correct invocation is missing.

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 adds meaning beyond the schema by clarifying the mutual exclusivity of 'postal_code' and 'place', the importance of '+ country', and giving concrete examples of the query semantics.

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 and resource ('Look up postal/ZIP codes and places') and explains the bidirectional nature with clear examples. This distinguishes it from broader geospatial siblings like search_geonames or get_nearby by focusing on postal code <-> place mapping.

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 clearly explains the two usage modes: pass 'postal_code' (+ country) to find places, or 'place' (+ country) to find postal codes. This gives strong context for invocation, though it does not mention when not to use it or name alternative tools.

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.