Skip to main content
Glama

Official Records Hub (UK & US): property, company, sanctions, health, vehicle & travel checks

lookup_uk_postcode

Pay-per-call UK (Great Britain) postcode lookup for AI agents. Send a postcode such as SW1A 2AA and get latitude/longitude, council (local authority), county, region, country, ward, parish, parliamentary constituency and LSOA/MSOA statistical area codes, as clean JSON. Built on official ONS / Ordnance Survey open data, with the required licence attribution included. Invalid or unknown postcodes return an error and are never charged. Great Britain only (no Northern Ireland). Use this when the user gives a UK postcode and needs where it is (coordinates, council, ward, constituency, region) or wants to check a postcode is real. Not for: detailed area data (use uk_location_report) or US addresses. Price: $0.005 USDC per call (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": {
      "q": "<q>"
    },
    "name": "lookup_uk_postcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesUK (Great Britain) postcode, e.g. SW1A 2AA. Example: SW1A 2AA

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does most of it: it discloses the pay-per-call x402 billing model, the exact price ($0.005 USDC), that invalid postcodes error out and are never charged, the GB-only scope excluding Northern Ireland, and that ONS/OS licence attribution is bundled. Minor gaps remain around rate limits, response latency, and whether the returned postcode is normalized, which keeps it below 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and the return payload, then constraints (GB-only, invalid-free billing), then routing guidance, then price. Every sentence carries information, though 'clean JSON' and 'Built on official ONS / Ordnance Survey open data' lean slightly promotional.

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, so the description's enumeration of return fields is doing necessary work, and it also covers billing, error behavior, and geographic scope. For a single-parameter lookup tool, an agent has everything it needs to decide to call it and to interpret the result.

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?

Only one parameter, and schema coverage is 100% with the example ('SW1A 2AA') already in the schema. The description restates the same example postcode format but adds no new constraint such as spacing/case normalization or whether a partial postcode is acceptable. Baseline 3 is appropriate when the schema already documents the sole 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?

States a specific verb and resource ('postcode lookup') and enumerates the returned data (coordinates, council, ward, constituency, LSOA/MSOA). It explicitly distinguishes itself from uk_location_report ('Not for: detailed area data') and from US addressing, so an agent can route correctly without opening the schema.

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?

Gives both a positive trigger ('when the user gives a UK postcode and needs where it is... or wants to check a postcode is real') and explicit exclusions with a named alternative (uk_location_report) plus US addresses. This is the full when/when-not/alternatives pattern.

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