Skip to main content
Glama

Lookup City

lookup_city
Read-onlyIdempotent

Get all postal codes (ZIP codes) for a city, given its country and state or province. Country and state may be written as names or codes — "California" and "CA" both work, as do "United States" and "US".

Input Schema

NameRequiredDescriptionDefault
cityYesCity name, e.g. "beverly hills". Spaces are fine — pass the name as written.
stateYesState, province or UK region, by name or abbreviation — "California" or "CA", "Ontario" or "ON", "England" or "eng".
countryYesCountry name or ISO 3166-1 alpha-2 code — "United States", "US", "Germany", "DE" all work.

Output Schema

NameRequiredDescriptionDefault
stateYesState or province name
placesYesList of postal codes in the city
countryYesFull country name
state_abbreviationYesState or province abbreviation
country_abbreviationYesISO 3166-1 alpha-2 country code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / city / description
      Previous value: -"City name (e.g. \"beverly+hills\" or \"beverly hills\")."New value: +"City name, e.g. \"beverly hills\". Spaces are fine — pass the name as written."
    • changedInput schema / properties / state / description
      Previous value: -"State or province, by name or abbreviation — \"California\" or \"CA\", \"Ontario\" or \"ON\"."New value: +"State, province or UK region, by name or abbreviation — \"California\" or \"CA\", \"Ontario\" or \"ON\", \"England\" or \"eng\"."
  2. Changed2 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO 3166-1 alpha-2 country code (e.g. \"us\", \"gb\")."New value: +"Country name or ISO 3166-1 alpha-2 code — \"United States\", \"US\", \"Germany\", \"DE\" all work."
    • changedInput schema / properties / state / description
      Previous value: -"State or province abbreviation (e.g. \"ca\" for California)."New value: +"State or province, by name or abbreviation — \"California\" or \"CA\", \"Ontario\" or \"ON\"."
  3. 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 postal codes in the city",
      +      "items": {
      +        "properties": {
      +          "lat": {
      +            "description": "Latitude coordinate",
      +            "type": "number"
      +          },
      +          "lon": {
      +            "description": "Longitude coordinate",
      +            "type": "number"
      +          },
      +          "name": {
      +            "description": "Place name (city)",
      +            "type": "string"
      +          },
      +          "post_code": {
      +            "description": "ZIP or postal code",
      +            "type": "string"
      +          },
      +          "state": {
      +            "description": "State or province name",
      +            "type": "string"
      +          },
      +          "state_abbreviation": {
      +            "description": "State or province abbreviation",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "post_code",
      +          "name",
      +          "state",
      +          "state_abbreviation",
      +          "lat",
      +          "lon"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "state": {
      +      "description": "State or province name",
      +      "type": "string"
      +    },
      +    "state_abbreviation": {
      +      "description": "State or province abbreviation",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "country",
      +    "country_abbreviation",
      +    "state",
      +    "state_abbreviation",
      +    "places"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "city": "beverly hills",
      +    "country": "us",
      +    "state": "ca"
      +  },
      +  {
      +    "city": "london",
      +    "country": "gb",
      +    "state": "england"
      +  }
      +]
  5. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering safety and side-effect profile. The description adds input flexibility (names or codes) but does not disclose additional behavioral traits like rate limits, pagination, or error handling. Given the strong annotation coverage, the description provides some value but not substantial behavioral context, warranting a baseline 3.

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, efficient sentence that immediately states the tool's purpose and includes valuable input flexibility examples. It is front-loaded with the verb and resource, and every phrase earns its place. No fluff or redundant details.

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?

For a simple read-only lookup tool with a comprehensive input schema and an output schema, the description is complete enough. It clearly indicates required inputs, provides formatting examples, and the annotations cover safety and idempotency. There are no missing critical details for selecting and invoking 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?

The input schema has 100% description coverage with detailed descriptions for each parameter (e.g., state: 'by name or abbreviation'), and the description includes examples like 'California'/'CA' and 'United States'/'US'. However, the description largely reiterates what the schema already states, adding no new semantic meaning beyond the schema. Thus, the baseline of 3 applies.

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 clearly states the tool's function: 'Get all postal codes (ZIP codes) for a city, given its country and state or province.' It uses a specific verb ('get') and resource ('postal codes'), but does not explicitly differentiate from the sibling tool 'lookup_zipcode', which might be the reverse operation. Therefore, it meets the criteria for a clear purpose without 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (when you need postal codes for a city given country and state), and provides input flexibility guidance ('Country and state may be written as names or codes'). However, it does not mention alternatives or when not to use this tool, such as pointing to 'lookup_zipcode' for the reverse lookup. Thus, usage context is implied but no explicit exclusions or alternatives are 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.