Skip to main content
Glama

UK Property & Location Data

uk_postcode_distance

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. 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.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a lot: it discloses the billing model ($0.01 USDC per call via x402), that failed lookups are never charged, geographic coverage limits, and the underlying ONS/Ordnance Survey data source. What it omits is the payment/auth mechanics of x402 and whether partial postcodes are accepted, so it falls just short of exhaustive.

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 purpose and return values, then pricing and error semantics. A few phrases are promotional filler ('for AI agents', 'Saves two lookups and the maths', 'as clean JSON') that could be trimmed without losing 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?

For a two-parameter, no-output-schema tool, the description is complete: it enumerates return fields in lieu of a schema, states cost, error behavior, and geographic scope. An agent has everything needed 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?

Schema description coverage is 100% and both parameters already carry descriptions and examples, so the schema does the heavy lifting. The prose adds only the notion that both ends must be valid GB postcodes with example formatting — useful but marginal beyond the structured fields.

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 — straight-line distance between two UK postcodes — and enumerates the returned fields (miles/km, direction, bearing, council, region, coordinates). It also implicitly distinguishes itself from the single-postcode lookup sibling by noting it 'saves two lookups', so an agent can tell why it exists alongside lookup_uk_postcode.

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?

Usage context is clear: call this instead of doing two postcode lookups plus manual math. The 'Great Britain only' line is an explicit scope exclusion and invalid/unknown postcodes are called out as error cases. It stops short of naming sibling tools directly or stating when to prefer uk_postcode_nearest, but the intended use case is unambiguous.

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