Skip to main content
Glama
PostalDataPI

PostalDataPI MCP Server

search_by_city

Find postal codes for any city worldwide. Provide city name, state (for US), and optional country code to retrieve all associated postal codes.

Instructions

Find all postal codes for a given city.

Use this when someone has a city name and needs the postal codes that serve it. For US cities, provide the state name or 2-letter abbreviation.

Args: city: City name (e.g., "Beverly Hills", "Berlin", "Tokyo") state: State or region name/abbreviation. Required for US cities (e.g., "CA" or "California"). country: ISO 3166-1 alpha-2 country code. Defaults to "US".

Returns: List of postal codes for the city.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cityYes
stateNo
countryNoUS

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the tool's core function and US-specific requirements but doesn't mention error handling, rate limits, authentication needs, or what happens with invalid inputs. The description adds basic context but lacks comprehensive behavioral details needed for a tool with no annotation coverage.

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 perfectly structured and front-loaded: purpose statement first, usage guidelines second, parameter explanations third, and return value last. Every sentence earns its place with no wasted words. The formatting with clear sections (Args, Returns) enhances readability without adding unnecessary length.

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?

Given the tool's moderate complexity, 0% schema coverage, no annotations, but the presence of an output schema, the description is quite complete. It covers purpose, usage, parameters, and return values adequately. The output schema handles return format details, so the description doesn't need to explain return structure. Minor gaps remain in behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing clear semantic explanations for all three parameters. It explains what each parameter represents, provides examples for 'city' and 'state', specifies when 'state' is required, and indicates the default value and format for 'country'. This adds substantial value beyond the bare schema.

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 the tool's purpose with a specific verb ('Find') and resource ('postal codes for a given city'), distinguishing it from sibling tools like 'get_postal_code_metadata', 'lookup_postal_code', and 'validate_postal_code' which focus on different operations. The first sentence directly answers 'what does this tool do?' without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('when someone has a city name and needs the postal codes that serve it') and includes specific requirements for US cities (state parameter required). It distinguishes usage from sibling tools by focusing on city-based searches rather than metadata retrieval, lookup, or validation operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PostalDataPI/postaldatapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server