Skip to main content
Glama

Validate addresses in payment rows

validate_addresses
Read-onlyIdempotent

Batch-validate party addresses across payment rows to catch rejections before generating the message. Enforces structured address policies with per-row findings.

Instructions

Batch-validate every party address across a list of payment rows.

Use this before ``generate_message`` to catch addresses that will be
rejected at the rail. The default ``hybrid_or_structured`` policy enforces
the November 14, 2026 cliff. Each finding is reported per offending
``(row, party)`` pair.

Returns ``{"policy": str, "is_valid": bool, "total": int, "errors":
[{"row": int, "party": str, "severity": str, "message": str,
"classification": str}, ...]}`` or an ``{"error": ...}`` payload.

Args:
    addresses: One or more payment-row dicts (see the field description).
    policy: The validation policy to enforce (see the enum values).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policyNoPostal-address validation policy. 'unstructured_ok' permits any form (pre-cutover / generic); 'hybrid_or_structured' rejects fully unstructured addresses (the SWIFT CBPR+ UG2026 default; its 14 November 2026 start was deferred on 27 August 2026 and Swift confirms new timing by December); 'structured_only' requires full structured form. Must be one of: 'unstructured_ok', 'hybrid_or_structured', 'structured_only'.hybrid_or_structured
addressesYesPayment-row dicts. The pipeline scans each row for columns of the form '{party}_address_{field}' (party in debtor, creditor, debtor_agent, creditor_agent, ultimate_debtor, ultimate_creditor; field a snake_case PostalAddress field such as twn_nm/ctry/strt_nm or adr_line_0..adr_line_6) and validates each party's address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.0.12
    • changedInput schema / properties / policy / description
      Previous value: -"Postal-address validation policy. 'unstructured_ok' permits any form (pre-cliff / generic); 'hybrid_or_structured' rejects fully unstructured addresses (the SWIFT CBPR+ UG2026 default in force from 14 November 2026); 'structured_only' requires full structured form. Must be one of: 'unstructured_ok', 'hybrid_or_structured', 'structured_only'."New value: +"Postal-address validation policy. 'unstructured_ok' permits any form (pre-cutover / generic); 'hybrid_or_structured' rejects fully unstructured addresses (the SWIFT CBPR+ UG2026 default; its 14 November 2026 start was deferred on 27 August 2026 and Swift confirms new timing by December); 'structured_only' requires full structured form. Must be one of: 'unstructured_ok', 'hybrid_or_structured', 'structured_only'."
  2. Addedv0.0.4

TDQS

A4.1/5.0
Behavior4/5

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

It discloses the default policy, the November 14, 2026 cliff, per-(row, party) error reporting, and the exact return payload, all of which align with the readOnly/idempotent annotations. However, the policy description in the schema notes the cliff was deferred, while the tool description says the policy 'enforces' that cliff, introducing a subtle inconsistency in behavior disclosure.

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 front-loaded with the core batch behavior and usage guidance, and the return contract is valuable because there is no output schema. The Args section is largely redundant with the schema, but it is brief and does not seriously bloat the description.

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?

For a tool with no output schema, the description compensates by spelling out the return shape and error payload. It also gives invocation context and policy defaults. Gaps include no explicit relationship to validate_address and the cliff-deferral nuance noted above, but the definition is still largely complete for correct selection and 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 parameters are already fully documented in the schema. The description's Args section merely points to the field description and enum values, adding no meaningful semantics beyond what the schema already provides.

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 begins with a specific verb-object pair: 'Batch-validate every party address across a list of payment rows.' This clearly distinguishes it from the singular validate_address sibling and from nearby validation tools.

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 explicitly says 'Use this before generate_message to catch addresses that will be rejected at the rail,' giving a clear when-to-use signal. It does not explicitly contrast with validate_address or provide when-not-to-use guidance, so it falls just short of full routing guidance.

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