Skip to main content
Glama

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

uk_postcode_nearest

Pay-per-call nearest-postcode search for AI agents. Send a UK (Great Britain) postcode and get the postcodes around it, closest first, with distance in metres, coordinates, council and ward, as clean JSON. Optional radius (up to 2000 m, default 500) and limit (up to 100, default 10). Useful for local search, delivery areas and catchments. Built on official ONS / Ordnance Survey open data. Invalid or unknown postcodes return an error and are never charged. Great Britain only. Use this when the user wants postcodes near a UK postcode or near coordinates. Not for: finding shops, services or places of interest. Price: $0.01 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": "uk_postcode_nearest"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesUK postcode to search around, e.g. SW1A 2AA. Example: SW1A 2AA
limitNoMaximum results, 1-100 (default 10). Example: 10
radiusNoSearch radius in metres, 1-2000 (default 500). Example: 500

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/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 so well: it discloses pay-per-call pricing ($0.01 USDC per call via x402), that invalid or unknown postcodes are never charged, the default and maximum radius/limit values, result ordering, the returned fields, the data provenance (ONS / Ordnance Survey), and the Great Britain-only boundary. These are exactly the non-obvious traits an agent needs before spending money on a call.

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?

The definition is front-loaded: capability, input, ordered output, then limits, then cost and exclusions. It is dense but nearly every sentence carries actionable information. Minor waste in the filler 'for AI agents' and the redundant repetition of the Great Britain restriction ('UK (Great Britain)' plus 'Great Britain only').

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?

There is no output schema, and the description compensates by enumerating the returned fields and ordering. Cost model, error behavior and geographic scope are all covered. It falls short of 5 because the coordinate-based usage claim is unsupported by the schema and payment/auth mechanics are only implied by the parenthetical '(x402)'.

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%, so all three parameters are already documented with types, ranges, defaults and examples. The description restates the same defaults and caps (radius up to 2000 m default 500, limit up to 100 default 10) without adding new meaning such as format constraints or interaction effects, so the baseline 3 applies. The mention of 'near coordinates' actively adds confusion since no coordinate parameter exists.

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 first sentence names a specific verb and resource ('nearest-postcode search'), states the input ('a UK (Great Britain) postcode') and the ordered output ('postcodes around it, closest first, with distance in metres, coordinates, council and ward'). It is clearly distinguishable from siblings such as lookup_uk_postcode or uk_postcode_distance because proximity/ordering is explicit.

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?

It gives an explicit when-to-use clause ('when the user wants postcodes near a UK postcode or near coordinates') and an explicit when-not clause ('Not for: finding shops, services or places of interest'), plus named use cases (local search, delivery areas, catchments). The only flaw is that 'near coordinates' advertises an input mode the schema does not support, and no sibling tool is named as the alternative.

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