Skip to main content
Glama
postcodes-io-mcp

postcodes-io-mcp

by Ankur1911

distance_between

Read-onlyIdempotent

Calculate the straight-line distance in kilometers and miles between two UK postcodes or coordinates. Use it to compare locations and see if two postcodes share a local authority, constituency, or country.

Instructions

Straight-line (great-circle) distance in km and miles between two UK locations. Each end is a postcode or a 'latitude,longitude' pair. For two postcodes it also says whether they share a local authority, parliamentary constituency and country. Not a driving or travel distance.

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": {
      "origin": "<origin>",
      "destination": "<destination>"
    },
    "name": "distance_between"
  }
}

Input Schema

NameRequiredDescriptionDefault
originYesPostcode, e.g. 'M1 1AE', or '53.48,-2.24'.
destinationYesPostcode, or 'latitude,longitude'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and openWorld, so the bar is lower; the description still adds value by disclosing the return payload (distance in both units) and the conditional extra output (shared local authority, constituency and country) that applies only to postcode pairs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Three short sentences: capability first, input forms second, conditional output third, exclusion last. No filler or repetition of the schema.

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?

With no output schema, the description correctly takes on responsibility for describing return values and does so. Minor gaps remain around mixed inputs (one postcode plus one coordinate pair) and the behavior for locations outside the UK.

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 the baseline is 3; the description earns above that by tying parameter type to output behavior — the administrative-area comparison only fires when both ends are postcodes, which is not derivable from the schema alone.

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 precise computation (great-circle distance), the units returned (km and miles), the geographic scope (UK), and the accepted input forms. The closing 'Not a driving or travel distance' explicitly separates it from routing-style tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The negative guidance ('not a driving or travel distance') is a genuine when-not, but there is no positive routing guidance naming alternatives such as nearest_postcodes for proximity searches or lookup_postcodes for resolving a single postcode.

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