Skip to main content
Glama

uk_postcode

Validate UK postcodes and retrieve location details such as region, district, coordinates, and administrative areas; also reverse-lookup postcodes from latitude and longitude.

Instructions

UK postcode lookup and validation (postcodes.io, ONS/OS open data): country, region, district, ward, parish, constituency, lat/lon, eastings/northings, NUTS; terminated postcodes detected; reverse lookup from lat/lon. Costs 0.001 USDC on Base per successful call (x402). Without a payment key this tool returns the 402 challenge.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "uk_postcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNoreverse: latitude
lonNoreverse: longitude
postcodeNoUK postcode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.5/5.0
Behavior5/5

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

With zero annotations, the description carries the full burden and does so well: it discloses the data provenance (postcodes.io, ONS/OS open data), that terminated postcodes are flagged, the exact price and chain (0.001 USDC on Base, x402), and the concrete failure mode when unauthenticated (a 402 challenge response). These are precisely the behavioral facts an agent cannot infer from the schema.

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?

Purpose is front-loaded in the first clause, and the economics/auth caveat is placed last where it belongs. The field enumeration is dense but each item is informative; the only mild cost is the run-on semicolon chain making it slightly harder to scan than a short bulleted structure.

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?

For a three-optional-parameter tool with no output schema, the description covers return fields, data source, pricing, and the unauthenticated case. It is incomplete only around degenerate inputs: all three parameters are optional, yet the description never states which mode is chosen or what error results if neither postcode nor lat/lon is provided.

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

Parameters4/5

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

Schema coverage is 100%, so parameter labeling is already handled. The description adds real meaning by establishing the two query modes and that lat/lon are an alternative input path rather than supplementary filters. It does not clarify behavior when both postcode and lat/lon are supplied, or what happens with no arguments (required: 0), leaving a small gap.

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 names a specific verb and resource ('UK postcode lookup and validation') and enumerates the data returned (country, region, district, ward, constituency, coordinates, NUTS), plus adds a second capability ('reverse lookup from lat/lon'). An agent can tell instantly this is the UK postcode resolution tool, distinct from the address/company siblings.

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?

The modes are implicitly but clearly mapped: supply 'postcode' for a forward lookup, 'lat'/'lon' for reverse. The payment precondition is stated explicitly ('without a payment key this tool returns the 402 challenge'), which is the key usage gate. There is no explicit when-not or comparison against alternative geo tools, so it stops short of a 5.

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