Skip to main content
Glama

util_postal_code

Read-only

Postal Code Validator — Validate and normalize a postal code offline for 62 countries (US ZIP and ZIP+4, Canada, UK, Ireland Eircode, Netherlands, Germany, France, Japan, Brazil CEP, India PIN, Poland, Portugal, Sweden and more). Pass code and country (2-letter ISO; UK accepted). Returns valid, the canonical form (e.g. sw1a1aa to SW1A 1AA, 1000001 to 100-0001) and the expected format; a bad code is 422 (not charged). Omit country to list every supported country whose format fits. Format check only - it does not confirm the code is in use. Price: $0.001 USDC (Base, via x402).

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": {
      "code": "<code>",
      "country": "<country>"
    },
    "name": "util_postal_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesSW1A1AA
countryYesGB

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/non-destructive; the description adds substantial behavior beyond them: offline format checking, the 422-on-bad-code response, 'not charged' on failure, and a price of $0.001 USDC via x402. That pricing and failure-cost disclosure is exactly the kind of context annotations cannot carry.

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?

Front-loaded with the verb and resource, then scope, then inputs/outputs, then cost — a sound order. The long country enumeration ('Poland, Portugal, Sweden and more') is somewhat padded, but nearly every clause carries usable information.

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?

There is no output schema, and the description compensates fully: it names the returned fields (valid, canonical form, expected format) and the failure mode (422). For a two-parameter lookup tool this covers everything an agent needs to invoke and interpret it.

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 description adds real meaning over bare schema examples — country is a 2-letter ISO code (UK also accepted), and it shows normalization outcomes ('sw1a1aa to SW1A 1AA', '1000001 to 100-0001'). However, 'Omit country to list every supported country' directly conflicts with the schema, which marks country as required, so an agent following the prose would hit a validation error.

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 and resource — 'Validate and normalize a postal code' — plus scope (62 countries, enumerated examples like US ZIP+4, Eircode, CEP, PIN). This clearly separates it from siblings such as util_address_parse or util_barcode without the agent opening any schema.

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 a concrete alternate mode ('Omit country to list every supported country whose format fits') and scopes the tool's limits ('Format check only - it does not confirm the code is in use'). No sibling alternative is named explicitly, so it falls short of a 5, but the when-to-use context is clear.

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