Skip to main content
Glama

ZIP code metadata

get_zipcode
Read-onlyIdempotent

Returns the state or states a US ZIP code (five digits or ZIP+4) belongs to; a ZIP that crosses a state line returns every state. Metadata only, no rates: use get_gsa_perdiem_by_zipcode for per diem. Send ZIPs as strings so leading zeros survive.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "zipcode": "<zipcode>"
    },
    "name": "get_zipcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
zipcodeYesUS ZIP (12345) or ZIP+4 (12345-6789)

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description still contributes real behavior by disclosing the multi-state edge case (a ZIP crossing a state line returns every state), which no structured field conveys. It stops short of saying what happens for an unrecognized ZIP, which keeps it from a 5.

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?

Two sentences, front-loaded with the return value, then scope limitation, alternative, and input caveat in descending priority. No sentence is filler and nothing is buried.

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 one-parameter lookup with no output schema, the description supplies the essentials: what it returns (one or more states), that it is not a rates source, the sibling to use instead, and the leading-zero pitfall. An agent can call this correctly with no further inference.

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% and the schema already documents the ZIP/ZIP+4 formats with examples, so the baseline applies. The one addition, sending ZIPs as strings so leading zeros survive, is genuinely useful but is thin compensation on an otherwise fully documented single parameter.

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?

"Returns the state or states a US ZIP code (five digits or ZIP+4) belongs to" gives a precise verb plus resource and names the accepted input formats. It is clearly separable from the many per diem and allowance siblings because it explicitly declares itself metadata-only.

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?

It states the negative case ("Metadata only, no rates") and names the exact alternative to use for rates, get_gsa_perdiem_by_zipcode. It also tells the caller how to format input (strings, preserving leading zeros), so both routing and invocation are covered.

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.

Resources