Skip to main content
Glama

Look Up UK Postcode

govuk_lookup_postcode
Read-onlyIdempotent

Find local authority, region, and constituency for any UK postcode to direct users to correct government services like council tax or planning.

Instructions

Look up a UK postcode to retrieve its local authority, region, constituency, and other administrative geography.

Useful for determining which council area, parliamentary constituency, or NHS region a postcode falls within. Commonly used to direct users to the correct local service on GOV.UK (e.g. council tax, planning, waste).

Uses the postcodes.io public API (no key required).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesPostcodeInput with a UK postcode (e.g. 'NG1 1AA', 'SW1A 2AA').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
postcodeNoCanonicalised postcode as returned by postcodes.io.
latitudeNoLatitude in decimal degrees (WGS84).
longitudeNoLongitude in decimal degrees (WGS84).
countryNoCountry, e.g. 'England', 'Scotland', 'Wales', 'Northern Ireland'.
regionNoONS region, e.g. 'East Midlands'.
parliamentary_constituencyNoParliamentary constituency (pre-2025 boundary).
parliamentary_constituency_2025NoParliamentary constituency under the 2025 boundaries.
local_authorityNoLocal authority / council covering the postcode.
admin_countyNoAdministrative county, where applicable (null in unitary areas).
nhs_integrated_care_boardNoNHS Integrated Care Board, where available.
codesNoGSS codes for all administrative geographies covering this postcode.
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, covering safety and idempotency. The description adds valuable context beyond annotations: it discloses the external API used ('postcodes.io public API'), authentication requirements ('no key required'), and typical use cases (government service direction). It does not contradict annotations, as 'look up' aligns with read-only behavior.

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?

The description is front-loaded with the core purpose in the first sentence, followed by usage guidelines and implementation details. Each sentence earns its place: the first defines the tool, the second explains when to use it, the third gives practical examples, and the fourth discloses the API source. There is no redundant or verbose content, making it highly efficient.

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?

Given the tool's low complexity (single parameter, read-only operation) and rich annotations (covering safety and idempotency), the description is complete. It explains the purpose, usage context, and external API, and since an output schema exists, it does not need to detail return values. The description adequately complements the structured data without gaps for this straightforward lookup tool.

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?

The input schema has 100% description coverage, fully documenting the single 'postcode' parameter with examples and constraints. The description does not add any parameter-specific information beyond what the schema provides, such as format details or edge cases. With high schema coverage, a baseline score of 3 is appropriate, as the description relies on the schema for parameter semantics.

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 clearly states the specific action ('look up a UK postcode') and the resource being retrieved ('local authority, region, constituency, and other administrative geography'). It distinguishes this tool from sibling tools like 'govuk_search' or 'govuk_list_organisations' by focusing exclusively on postcode-based administrative geography lookup, not general search or organization listing.

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?

The description explicitly states when to use this tool: 'Useful for determining which council area, parliamentary constituency, or NHS region a postcode falls within' and 'Commonly used to direct users to the correct local service on GOV.UK (e.g. council tax, planning, waste).' It provides clear context about its purpose in government service navigation, distinguishing it from more general search tools among its siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/govuk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server