Skip to main content
Glama

Find the postcode at a location

find_postcode_at_location
Read-onlyIdempotent

Find the postcode of the nearest building to a latitude and longitude in Nigeria. Search within 25 metres by default; names and addresses need NG_POSTCODE_MAX_LEVEL 2+.

Instructions

Return the postcode of the nearest building to a coordinate in Nigeria.

Names and the house address are withheld unless NG_POSTCODE_MAX_LEVEL is 2 or more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYesLatitude in decimal degrees, e.g. 7.6211.
longitudeYesLongitude in decimal degrees, e.g. 5.2214.
max_distance_mNoSearch radius in metres. Defaults to 25.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaYesEnclosing area code, e.g. EK-01-A03-FK.
unitYes
depthNoHow deep the match goes, e.g. unit.
foundYesFalse when no building is within the radius.
stateYes
messageYes
districtYes
radius_mYesThe radius the API actually applied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.1
    • addedInput schema / properties / latitude / description
      Added value: +"Latitude in decimal degrees, e.g. 7.6211."
    • addedInput schema / properties / longitude / description
      Added value: +"Longitude in decimal degrees, e.g. 5.2214."
  2. First observedv0.2.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, openWorld), but the description adds a genuinely non-obvious behavior: names and house address are withheld unless NG_POSTCODE_MAX_LEVEL is 2 or more. That explains a conditional output shape an agent would otherwise misread as a failure. It still doesn't say what happens when no building falls inside the radius.

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?

Two sentences, zero filler. The primary behavior (return postcode of nearest building to a coordinate in Nigeria) is front-loaded, and the conditional output caveat follows immediately after.

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?

An output schema exists, so return-value structure needn't be restated, and the description covers the one surprising output behavior (field withholding). The remaining gap is the no-result / out-of-radius case and whether max_distance_m truncates or errors, which an agent would benefit from knowing.

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 all three parameters carry their own descriptions and bounds, so the schema does the heavy lifting. The description adds only the contextual constraint that the coordinate must be in Nigeria, which is mild added value rather than new syntax or format detail. Baseline 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?

States a specific verb (Return) plus resource (postcode of the nearest building) and a precise scope (a coordinate in Nigeria). This cleanly separates it from siblings like lookup_postcode (by postcode) and resolve_address (by address), so an agent can route correctly without opening any schema.

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 reverse-geocoding use case (coordinate in, postcode out) is implied clearly enough that an agent can infer when to pick this over the postcode-first siblings. However, it never explicitly names an alternative or states a when-not condition, e.g. what to do if the caller has an address instead of a coordinate.

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