Skip to main content
Glama

Resolve a Nigerian address to a postcode

resolve_address
Read-onlyIdempotent

Convert a described Nigerian address into a NIPOST postcode, returning a full code only when the address, pin, or exact landmark supports it, or an area prefix with a follow-up question.

Instructions

Turn a described Nigerian address into a postcode, only as precisely as the evidence allows.

A full building code comes only from a postcode written in the address, a location pin, or a landmark that is the address itself. Otherwise the result is an area or district prefix with a question for the user. Read the address yourself and fill landmarks and geocode_queries; the address text is sent to the configured geocoder.

Input Schema

NameRequiredDescriptionDefault
addressYesThe address exactly as the user gave it.
latitudeNoLatitude of a location pin the user shared.
landmarksNoLandmarks named in the address, each with how the address relates to it. Use 'at' only when the address is the landmark itself.
longitudeNoLongitude of that pin. Give it with latitude.
geocode_queriesNoUp to three map search strings you derive from the address: named places and streets with the town and state, most specific first, without directional words like 'back of'.

Output Schema

NameRequiredDescriptionDefault
codeYesA full postcode at building level, else a prefix.
levelYes
methodYes
statusYes
evidenceYes
questionYesWhat to ask the user to get a better answer.
confidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.5
    • addedInput schema / $defs / Landmark / description
      Added value: +"A landmark as a caller may send it: the name has a limit."
    • addedInput schema / $defs / Landmark / properties / name / maxLength
      Added value: +120
    • addedInput schema / properties / address / maxLength
      Added value: +500
    • changedInput schema / properties / geocode_queries / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 3,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "maxLength": 200,
      +      "type": "string"
      +    },
      +    "maxItems": 3,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / landmarks / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "$ref": "#/$defs/Landmark"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "$ref": "#/$defs/Landmark"
      +    },
      +    "maxItems": 10,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed2 schema fields changedv0.4.1
    • changedInput schema / properties / latitude / description
      Previous value: -"A location pin the user shared."New value: +"Latitude of a location pin the user shared."
    • addedInput schema / properties / longitude / description
      Added value: +"Longitude of that pin. Give it with latitude."
  3. First observedv0.2.4

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint and idempotentHint, so the safety profile is covered. The description adds genuinely non-obvious behavior: results may be deliberately imprecise with a `question` returned for the user, and the address text is transmitted to the configured geocoder. That external-disclosure detail is valuable beyond the annotations.

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 action, followed by the precision rule that governs the output. Two tight paragraphs with no filler, though the second paragraph mixes workflow instruction with external-disclosure context slightly awkwardly.

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 shape needn't be explained, and the description still flags the `question` field. Combined with the precision rules and geocoder disclosure, an agent has enough to call this correctly; only sibling routing remains unaddressed.

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%, so the baseline is 3; every parameter including the Landmark relation enum is already documented in the schema. The description's 'read the address yourself and fill landmarks and geocode_queries' reiterates the workflow but adds no syntax or format detail beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource ('Turn a described Nigerian address into a postcode') and adds the key behavioral nuance of precision tiers (full building code vs area/district prefix). It does not, however, explicitly differentiate itself from siblings like lookup_postcode or find_postcode_at_location, so an agent must infer the distinction.

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?

It gives clear operational guidance: read the address yourself, populate `landmarks` and `geocode_queries`, and expect only a prefix when no pin/postcode/at-landmark evidence exists. It stops short of naming alternatives or stating when-not to use this tool versus the sibling postcode tools.

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