Skip to main content
Glama

GeoNames Postal Code Lookup

geonames.postal.lookup
Read-onlyIdempotent

Look up postal / ZIP codes and their place names across 100+ countries using the GeoNames database. Search by postal code (e.g. "10001" for NYC, "SW1A 1AA" for London, "75001" for Paris) or by place name. Returns matching postal codes with lat/lng, admin area names, and ISO-3166-2 subdivision codes. Use the country filter (ISO-3166 2-letter) to narrow results. Covers US, UK, Germany, France, Australia, Canada, Japan, India, Brazil, and 90+ more. CC BY 4.0 open data, no upstream cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNoISO-3166 2-letter country code to restrict the postal code search (e.g. "US", "GB", "DE")
max_rowsNoMaximum number of results to return (default 10, max 1000)
place_nameNoPlace or city name to search postal codes for (e.g. "Berlin", "Sydney"). Use with country for best results.
postal_codeNoPostal / ZIP code to look up (e.g. "10001" for New York, "SW1A 1AA" for London)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

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 provide readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, so the burden on the description is lower. The description adds valuable behavioral context beyond annotations: it discloses the data source (GeoNames), licensing (CC BY 4.0), and that there is no upstream cost. It also describes the kind of output fields (lat/lng, admin area names, ISO-3166-2 codes), which informs the agent of what to expect. No contradictions with 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 several sentences but well-structured and front-loaded with the main action. It includes examples, output qualities, country coverage, and licensing without excessive fluff. Each sentence contributes useful information, though it could be tightened (e.g., merging the country list and licensing sentence). It remains concise considering the information needed for a global lookup tool.

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 four optional parameters, an output schema, and rich annotations, the description covers the tool's purpose, search modes, country filtering, coverage, and data source. The output schema handles return-value details, so the description need not list them exhaustively. The only missing element is guidance on when not to use this tool or how it compares to other postal lookups, but the overall definition is complete enough for correct invocation.

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?

The input schema covers all parameters with detailed descriptions, including examples for postal_code and place_name, so schema coverage is 100%. The description adds some redundant examples (e.g., '10001', 'SW1A 1AA') and reinforces the country filter, but it does not provide meaningfully new information beyond what the schema already documents. Baseline of 3 is appropriate since the schema carries the heavy lifting.

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 clearly states a specific verb ('look up') and resource ('postal / ZIP codes ... using the GeoNames database'), and differentiates from siblings by noting the global coverage (100+ countries) and the specific data source. The examples and output fields further solidify what the tool does, making it distinguishable from more localized postal lookup tools like address.ukpost.lookup or postcode-japan.postal.lookup.

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?

The description provides clear context on how to use the tool: search by postal code or place name, use the country filter to narrow results, and covers a broad set of countries. It does not explicitly mention when to use this tool versus other postal lookup alternatives, but the global scope and GeoNames origin implicitly guide the agent. The 'Use the country filter' instruction is a concrete usage tip, though no 'when not to use' or sibling comparison is given.

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.