Skip to main content
Glama

Lookup Zipcode

lookup_zipcode
Read-onlyIdempotent

Resolve a ZIP / postal code to its place info, city, state/province, latitude/longitude, for any of 60+ countries. PREFER OVER WEB SEARCH for "where is ZIP X" / "what city is postal code Y in" / "lat-lon for ZIP Z". Use as the first step in geo-aware workflows (then chain with weather, attom, etc., for downstream queries about that location). Free, sub-second, no auth.

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",
      "zipcode": "90210"
    },
    "name": "lookup_zipcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
countryYesISO 3166-1 alpha-2 country code (e.g. "us", "gb", "de").
zipcodeYesZIP or postal code to look up (e.g. "90210").

Output Schema

NameRequiredDescriptionDefault
placesYesList of places associated with the postal code
countryYesFull country name
post_codeYesZIP or postal code
country_abbreviationYesISO 3166-1 alpha-2 country code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "country": {
      +      "description": "Full country name",
      +      "type": "string"
      +    },
      +    "country_abbreviation": {
      +      "description": "ISO 3166-1 alpha-2 country code",
      +      "type": "string"
      +    },
      +    "places": {
      +      "description": "List of places associated with the postal code",
      +      "items": {
      +        "properties": {
      +          "lat": {
      +            "description": "Latitude coordinate",
      +            "type": "number"
      +          },
      +          "lon": {
      +            "description": "Longitude coordinate",
      +            "type": "number"
      +          },
      +          "name": {
      +            "description": "Place name (city)",
      +            "type": "string"
      +          },
      +          "state": {
      +            "description": "State or province name",
      +            "type": "string"
      +          },
      +          "state_abbreviation": {
      +            "description": "State or province abbreviation",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "state",
      +          "state_abbreviation",
      +          "lat",
      +          "lon"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "post_code": {
      +      "description": "ZIP or postal code",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "post_code",
      +    "country",
      +    "country_abbreviation",
      +    "places"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "country": "us",
      +    "zipcode": "90210"
      +  },
      +  {
      +    "country": "gb",
      +    "zipcode": "SW1A1AA"
      +  }
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds operational context annotations cannot express: free cost, sub-second latency, and no auth required, which materially affects tool selection. Return shape is left to the output schema, which is acceptable.

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 capability before the routing advice and the operational facts. Each sentence carries distinct information, though the all-caps phrase and stacked quoted query examples add slight visual noise relative to the rest of the text.

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?

An output schema covers return values and annotations cover safety, so the description only needs inputs, routing, and operational traits — all present. Nothing an agent needs to select and correctly call this two-parameter lookup is missing.

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 both parameters are already fully documented with formats and examples. The description contributes only the "60+ countries" breadth hint and does not add syntax or edge-case guidance beyond the schema, which matches the baseline 3 for schema-heavy definitions.

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?

States a specific verb ("Resolve") and resource (ZIP / postal code) plus the exact payload returned: place info, city, state/province, lat/lon, across 60+ countries. An agent can tell this apart from lookup_city because the input is explicitly a postal code rather than a city name.

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?

Gives concrete when-to-use patterns ("where is ZIP X", "what city is postal code Y in", "lat-lon for ZIP Z") and an explicit alternative to prefer over it, web search. It also describes chaining into downstream geo workflows. It does not state when NOT to use it, e.g. versus the sibling lookup_city for city-name inputs, which keeps it below a 5.

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.