Skip to main content
Glama
sebastienrousseau

structured-address-fix-mcp

Parse an address with libpostal

parse_address_libpostal
Read-onlyIdempotent

Parse free-text addresses into ISO 20022 postal fields (street name, building number, postal code, town, country) using libpostal or regex fallback, with optional country hint.

Instructions

Parse a free-text address into ISO 20022 postal fields.

Uses the optional libpostal statistical parser (the ``postal`` binding,
which requires the system libpostal C library) when it is installed,
and otherwise degrades to this repo's own regex heuristics. Either way
the address is mapped to ``StrtNm``, ``BldgNb``, ``PstCd``, ``TwnNm``
and ``Ctry``. The result's ``parser`` field is ``"libpostal"`` or
``"fallback"`` so callers know which path ran. Runs purely on CPU with
no network or filesystem access, though the libpostal path depends on
an external C library.

Args:
    unstructured_address: The free-text address to parse.
    country_hint: Country to assume when the text names none.

Returns ``{"parser": ..., "address": {StrtNm, BldgNb, PstCd, TwnNm,
Ctry}}``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
country_hintNoAn ISO 3166-1 alpha-2 hint (or country name) used when the address text does not name its own country.
unstructured_addressYesA single free-text postal address, e.g. '12 Rue de Rivoli, 75001 Paris, France'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.1/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: it discloses the optional libpostal C library dependency, the fallback regex path, the 'parser' field that reports which path ran, and that it runs purely on CPU with no network or filesystem access. This is rich, useful context that the annotations alone do not provide.

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?

The description is well-structured and front-loads the core purpose, with separate sentences for behavior, output mapping, and operational constraints. It is slightly longer than strictly necessary because the Args and Returns sections partially duplicate the schema and output schema, but every section remains readable and purposeful.

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 strong annotations, full schema coverage, and existing output schema, the description is complete enough for an agent to call this tool correctly. It covers input requirements, fallback behavior, dependency constraints, and output shape, leaving no critical gap for safe invocation.

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 schema already fully documents both parameters. The description's Args section largely restates the schema's meaning without adding significant new detail, so it does not elevate the parameter semantics beyond the baseline.

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 clearly states a specific verb and resource: 'Parse a free-text address into ISO 20022 postal fields.' It also lists the concrete output fields (StrtNm, BldgNb, PstCd, TwnNm, Ctry), making the operation easy to understand. It does not explicitly contrast with sibling tools such as classify_address or assess_address, so it falls short of a 5.

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?

The description gives clear context: this tool is for parsing a free-text address into structured postal fields, and it explains that it can run with libpostal or fall back to regex heuristics. It does not explicitly state when to use this tool instead of sibling tools or when not to use it, so it lacks exclusions or alternative routing.

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

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/sebastienrousseau/structured-address-fix-mcp'

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