Skip to main content
Glama

Convert MT101 to pain.001 records

convert_mt101
Read-onlyIdempotent

Convert a legacy SWIFT MT101 message into flat records for pain.001 XML generation. Parse multiple transfers per message and feed results to validation and message generation tools.

Instructions

Convert a legacy SWIFT MT101 message into pain.001-ready records.

Use this to bridge the Nov-2025+ SWIFT MT→MX migration: parse an MT101
(*Request for Transfer*) into the flat records the other tools consume —
feed the result straight to ``validate_records`` /
``validate_payment_scheme`` and then ``generate_message`` to emit
pain.001.001.09 XML. An MT101 can request many transfers (repeating
sequence B), so this returns *one record per transaction*. Operates on
the supplied text only; no file is read or written.

Wraps :func:`pain001_loader_mt101.loader.parse_mt101`. Sequence-A
ordering-customer / account-servicing fields apply to every transaction
unless a sequence-B block overrides them; fields the MT101 does not
carry are synthesised to schema defaults (``payment_method`` ``"TRF"``,
``service_level_code`` ``"SEPA"``, etc.).

Args:
    mt101_text: The MT101 payload as a string.

Returns:
    A list of flat pain.001 records (one per transaction), or an
    ``{"error": ...}`` dict if the MT101 is missing a mandatory field
    (``:20:``, ``:30:``, or per transaction ``:21:`` / ``:32B:`` /
    a named beneficiary) or is otherwise malformed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mt101_textYesA legacy SWIFT MT101 (Request for Transfer) message as text — a bare ':tag:' field list or a raw '{4:...-}' block-4 envelope. An MT101 may carry several sequence-B transfers; each becomes its own record.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses key behaviors beyond annotations: it parses MT101 text only, returns one record per transaction, synthesizes default values for missing fields, and returns an error dict for malformed input. Annotations already declare readOnlyHint, idempotentHint, etc., and the description aligns with and enriches these.

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 detailed but well-structured, front-loading the core purpose and usage context. It uses a mix of prose and a structured Args section. While slightly verbose, every sentence adds value. It is more informative than concise but not wasteful.

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 tool's complexity (one parameter, clear output), the description comprehensively covers input format, behavior, return values (including error handling), and relationships to sibling tools. The return type is explicitly a list of records or an error dict, satisfying completeness without needing the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds significant value by elaborating on the parameter's format (bare ':tag:' field list or block-4 envelope), which helps the agent correctly format input. This justifies a score above baseline.

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 clearly states the tool converts MT101 to pain.001 records, specifies the input and output, and distinguishes it from sibling tools by outlining the downstream workflow (validate_records, generate_message). The verb 'convert' is specific and the resource is well-defined.

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 states when to use the tool (for SWIFT MT→MX migration) and provides a clear workflow sequence. It does not explicitly state when not to use it, but the context is sufficiently clear. The mention of alternatives is implicit through the sibling tool list.

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/pain001-mcp'

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