Skip to main content
Glama

Sanitise text to ISO 20022 charset

sanitize_to_iso20022_charset
Read-onlyIdempotent

Transliterates accented characters and removes unsupported symbols from free-text fields to ensure ISO 20022 compliance. Returns the cleaned string and indicates if changes were made.

Instructions

Sanitise one free-text field to the ISO 20022 Latin character set.

Use this on a single free-text value (name, remittance info) to
transliterate accents and drop unsupported symbols before placing it in
a record, and to see whether the value changed. Operates on one string;
to check a whole batch's rulebook compliance use ``validate_payment_scheme``.

Wraps :func:`pain001.sanitize_to_charset`. Transliterates accents
(``é`` -> ``e``), removes unsupported symbols, and returns both
the cleaned string and a flag for whether the original was
already valid - useful for surfacing the change to the user
before writing it back to a record.

Args:
    value: The text to sanitise.

Returns:
    ``{"value": str, "sanitised": str, "was_valid": bool, "changed": bool}``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesA single free-text field value (e.g. a name or remittance line) to transliterate to the ISO 20022 Latin character set.
Behavior5/5

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

Annotations already indicate readOnly, idempotent, and non-destructive behavior. The description adds detailed behavioral context: transliterates accents, removes unsupported symbols, returns cleaned string and a validity flag. No contradiction.

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 with sections for usage, details, and arguments. It is slightly verbose but efficient, front-loading the purpose. Could be more concise, but still effective.

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 simple tool with one parameter, good annotations, and explicit return format described, the description provides complete context. It explains the wrapped function and the output structure, leaving no gaps.

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 covers the parameter fully (100% coverage). The description adds minimal extra semantics beyond the schema's description of the parameter, so baseline 3 is appropriate.

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 sanitizes a single free-text field to the ISO 20022 Latin character set, using a specific verb and resource. It distinguishes from the sibling tool validate_payment_scheme, which checks whole batch compliance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use this tool (on a single free-text value) and when not to (for batch compliance, use validate_payment_scheme). It provides clear context and an alternative.

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