Skip to main content
Glama

Generate reversal document

generate_reversal
Read-onlyIdempotent

Parse an incoming camt.053 bank statement, select entries with a specified return reason code (e.g., AC04 for closed accounts), and generate a validated reversal XML document.

Instructions

Generate a validated camt.053.001.14 reversal document from a statement.

This is the headline one-shot workflow: pass an incoming statement and a
return-reason code and get back the reversal XML (nothing is written to
disk). Preview which entries will be reversed first with ``filter_entries``
using the same ``reason_code``.

This is the headline one-shot workflow: parse the incoming camt.053, pick
the entries with the requested return reason (e.g. AC04 Closed Account),
and emit a validated camt.053.001.14 reversal statement.

Returns the validated XML document as a string, or an ``{"error": ...}``
payload (serialized) if generation fails.

Args:
    xml: The raw incoming statement XML as a string.
    reason_code: The ISO external return reason to reverse (default
        ``"AC04"``).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesThe raw incoming camt.053 statement XML document as a string; the entries carrying reason_code are reversed into a new camt.053.001.14 document.
reason_codeNoThe ISO external return reason code whose entries are reversed, e.g. 'AC04' Closed Account (the default). Preview the matches with filter_entries using the same code; call list_return_reasons for all accepted codes.AC04

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds that the tool 'nothing is written to disk' and 'Returns the validated XML document as a string, or an {"error": ...} payload', which clarifies the non-destructive, read-only behavior. It also describes the workflow of selecting entries by reason_code.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a headline, workflow explanation, and Args section. However, there is some redundancy: the sentence 'This is the headline one-shot workflow: ...' appears twice. The Args section largely repeats schema descriptions. It could be tightened by removing the duplicate sentence and streamlining parameter details.

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?

Given moderate complexity (2 parameters, output schema present), the description covers the purpose, workflow, parameters, return type (XML string or error), and references sibling tools for preview and code lookup. It lacks an explicit example, but the output schema and parameter descriptions provide sufficient detail. Overall complete for the tool's purpose.

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?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds value by noting that the xml parameter is 'the raw incoming statement XML as a string' and for reason_code, it specifies the default value 'AC04' and suggests using filter_entries for preview and list_return_reasons for accepted codes. This extra context improves usability.

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 generates a validated camt.053.001.14 reversal document from a statement. It specifies the verb 'generate', the resource (reversal document), and distinguishes from siblings by mentioning filter_entries and list_return_reasons as related tools for preview and code lookup.

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 describes when to use the tool: 'pass an incoming statement and a return-reason code and get back the reversal XML'. It provides guidance to preview entries with filter_entries using the same reason_code, and to list accepted codes via list_return_reasons. It does not give explicit when-not-to-use instructions but the context 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/camt053-mcp'

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