Skip to main content
Glama

Official Records Hub: UK & US Property and Location Data

uk_postcode_distance

Read-onlyIdempotent

Pay-per-call distance between two UK (Great Britain) postcodes for AI agents. Send from and to postcodes (e.g. SW1A 2AA and M1 1AE) and get the straight-line distance in miles and kilometres, the compass direction and bearing, plus the council, region and coordinates of both ends, as clean JSON. Saves two lookups and the maths. 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 asks how far apart two UK postcodes are. Not for: driving times or routes. 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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "uk_postcode_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesDestination UK postcode, e.g. SW1A 2AA. Example: SW1A 2AA
fromYesStarting UK postcode, e.g. L35 1QA. Example: L35 1QA

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses pricing and payment mechanics ($0.01 USDC via x402), failure billing behavior ('invalid or unknown postcodes return an error and are never charged'), the data provenance (ONS / Ordnance Survey), and the full shape of the payload. These are exactly the traits an agent cannot infer from structured fields.

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?

It is front-loaded with what is returned and the pricing, then closes with the when-to-use rule. Slightly long for two parameters, with mild redundancy ('UK (Great Britain)' restated as 'Great Britain only') and a marketing aside ('Saves two lookups and the maths').

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 by enumerating the return fields (miles, kilometres, direction, bearing, council, region, coordinates) and the JSON format. Combined with pricing, error semantics and geographic limits, an agent has everything needed to invoke and interpret it.

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% and both parameters already carry examples, so the baseline is 3. The description adds genuine constraint semantics beyond the schema: both ends must be Great Britain postcodes, and invalid ones produce an error rather than a billable result — useful for input validation decisions.

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 — straight-line distance between two UK postcodes — and immediately delimits scope with 'Great Britain only' and 'Not for: driving times or routes'. That distinguishes it cleanly from adjacent tools like lookup_uk_postcode, uk_postcode_nearest and uk_postcode_batch.

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 triggering condition explicitly ('Use this when the user asks how far apart two UK postcodes are') and carves out an exclusion ('Not for: driving times or routes'), which is the most likely misselection. The 'Saves two lookups' phrasing also implicitly signals that lookup_uk_postcode would otherwise be needed.

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