Skip to main content
Glama

Lookup Postcode

lookup_postcode
Read-onlyIdempotent

Get geographic details for a UK postcode (e.g., 'SW1A 1AA'). Returns coordinates, region, district, ward, and constituency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
postcodeYesUK postcode to look up (e.g. "SW1A 1AA" or "SW1A1AA").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
latNoLatitude coordinate
lonNoLongitude coordinate
codesYesCodes mapping object
incodeYesIncode part of postcode
regionNoRegion name
countryYesCountry name
outcodeYesOutcode part of postcode
eastingsNoEastings grid reference
postcodeYesThe UK postcode
northingsNoNorthings grid reference
admin_wardNoAdministrative ward
admin_districtNoAdministrative district
parliamentary_constituencyNoParliamentary constituency

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "admin_district": {
      +      "description": "Administrative district",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "admin_ward": {
      +      "description": "Administrative ward",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "codes": {
      +      "description": "Codes mapping object",
      +      "type": "object"
      +    },
      +    "country": {
      +      "description": "Country name",
      +      "type": "string"
      +    },
      +    "eastings": {
      +      "description": "Eastings grid reference",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "incode": {
      +      "description": "Incode part of postcode",
      +      "type": "string"
      +    },
      +    "lat": {
      +      "description": "Latitude coordinate",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "lon": {
      +      "description": "Longitude coordinate",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "northings": {
      +      "description": "Northings grid reference",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "outcode": {
      +      "description": "Outcode part of postcode",
      +      "type": "string"
      +    },
      +    "parliamentary_constituency": {
      +      "description": "Parliamentary constituency",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "postcode": {
      +      "description": "The UK postcode",
      +      "type": "string"
      +    },
      +    "region": {
      +      "description": "Region name",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "postcode",
      +    "incode",
      +    "outcode",
      +    "country",
      +    "codes"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "postcode": "SW1A 1AA"
      +  },
      +  {
      +    "postcode": "M1 1AE"
      +  }
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds valuable context by specifying what data is returned (coordinates, region, district, ward, constituency), going beyond the annotation-level information without contradicting it.

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 two sentences, front-loaded with the primary action, and includes an example and return fields. Every sentence earns its place with no fluff or repetition.

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?

The tool has a single parameter, comprehensive annotations, and an output schema. The description fully covers the tool's purpose and return values, making it complete for a simple lookup tool. No additional behavioral context is needed given the simplicity and rich structured metadata.

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 coverage is 100%, and the schema already provides a clear description and examples for the postcode parameter. The description repeats an example ('SW1A 1AA') but adds no new semantic information beyond what the schema documents, so a baseline score of 3 is appropriate.

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 verb 'Get' and the resource 'geographic details for a UK postcode', and it lists specific return fields (coordinates, region, district, ward, constituency). This distinguishes it from sibling tools like validate_postcode or random_postcode by focusing on retrieval of geographic details for a given postcode.

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 description implies usage when geographic details for a UK postcode are needed, but it does not explicitly state when to use this tool versus alternatives like validate_postcode or nearest_postcodes. No exclusions or alternative tool mentions are provided.

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.