Skip to main content
Glama

Repair an unstructured address

repair_address
Read-onlyIdempotent

Upgrades legacy unstructured address lines to hybrid/structured form using country-specific heuristics for GB, US, DE, FR, JP and best-effort for other countries. Prepares pre-cliff data for November 2026 compliance.

Instructions

Upgrade legacy unstructured address lines toward hybrid/structured form.

Experimental country-aware repair (``GB``, ``US``, ``DE``, ``FR``, ``JP``
have dedicated heuristics; other countries get a best-effort pass promoting
the last line to a town). Use this to lift pre-cliff data over the
November 14, 2026 bar; audit the output before submitting, and keep both
the original and derived address in your audit trail.

Returns ``{"address": {...}, "classification": str, "is_structured":
bool, "is_hybrid": bool}`` (so you can see the unstructured -> hybrid /
structured upgrade) or an ``{"error": ...}`` payload.

Args:
    lines: Legacy unstructured address lines.
    country: ISO 3166-1 alpha-2 country code driving the heuristics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesYesLegacy unstructured address lines (free-form). Empty or whitespace-only lines are skipped.
countryYesISO 3166-1 alpha-2 country code (e.g. 'GB', 'US', 'DE', 'FR', 'JP') used to drive country-aware repair heuristics.
Behavior4/5

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

Annotations indicate read-only, idempotent, non-destructive behavior. The description adds transparency about experimental status, country-specific heuristics, return structure (address/classification/is_structured/is_hybrid/error), and the need for auditing. No contradictions with 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?

The description is structured with a title, usage note, return information, and args list. It is informative but not overly verbose. Slightly longer than necessary, but front-loaded with key purpose and usage.

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?

For a simple 2-parameter tool with full schema coverage and no output schema, the description comprehensively covers the return value, usage context, and behavioral notes. It is complete for an AI agent to understand and invoke correctly.

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% for both parameters. The description's parameter explanations largely mirror the schema, adding minimal extra meaning. Baseline 3 is appropriate as the schema already carries the descriptive burden.

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 it upgrades legacy unstructured address lines to hybrid/structured form, with a specific verb and resource. However, it does not explicitly distinguish itself from sibling tools like classify_address, though the transformation focus is different.

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 provides explicit usage guidance: use for pre-cliff data upgrade, audit output, and keep both versions. It also notes the experimental nature and country-specific heuristics. No explicit when-not-to-use or alternative tools mentioned, but the guidance is clear.

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/sebastienrousseau/pacs008-mcp'

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