Generate pain XML from a CSV file
generate_message_from_fileGenerate validated ISO 20022 pain XML from a local payment data file (CSV, SQLite, JSON, JSONL, or Parquet), applying path-safety checks and file validation.
Instructions
Generate validated pain XML from a payment data file on the local disk.
Use this when the records live in a file rather than in memory; if
you already have them as dicts, call ``generate_message``. The file
is read and validated by the core's own loader and validation
ladder, exactly as ``pain001 generate`` reads it, so the same
path-safety guards apply and the same files are refused; an issue's
``line`` is the file's line (a CSV header is line 1).
Args:
message_type: A supported ISO 20022 pain message type.
data_file_path: Path to the payment data file.
Returns:
The validated XML, or a JSON-encoded ``{"error", "issues"?}``
payload as ``generate_message`` returns it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"message_type": "<message_type>",
"data_file_path": "<data_file_path>"
},
"name": "generate_message_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_type | Yes | A supported ISO 20022 pain message type. Must be exactly one of: 'pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05', 'pain.001.001.06', 'pain.001.001.07', 'pain.001.001.08', 'pain.001.001.09', 'pain.001.001.10', 'pain.001.001.11', 'pain.001.001.12', 'pain.001.001.13', 'pain.008.001.02', 'pain.008.001.08', 'pain.001', 'pain.008' (see list_message_types). The bare family names 'pain.001' and 'pain.008' are accepted as aliases for 'pain.001.001.09' and 'pain.008.001.02'. | |
| data_file_path | Yes | Local filesystem path, below the server's working directory, to a payment data file: CSV (one record per row, a header matching the template columns, see inspect_template), SQLite, JSON, JSONL or Parquet (see list_supported_formats). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |