Summarize statement balances
summarize_statementSummarize a bank statement's balances and totals by extracting key summary fields from inline text input, skipping transaction rows. Supports formats like CAMT, MT940, CSV, OFX.
Instructions
Summarize an inline statement's balances and totals only.
Use this when you need just the opening/closing balances, currency, and
other summary fields without the per-transaction rows. For the full
transaction detail alongside the summary, use ``parse_statement``
instead.
Args:
content: The raw statement text.
filename: Original filename; its extension selects the format.
format: Explicit format override.
Returns:
The summary record with Decimal values stringified.
Raises:
ValueError: If the format is unsupported or cannot be detected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Explicit format identifier that overrides detection from the filename. One of: 'camt' (CAMT.053), 'pain001', 'csv', 'ofx', 'qfx', 'mt940'. When omitted, the format is inferred from the filename extension. | |
| content | Yes | The raw statement text to summarize, inline (not a file path). Accepts ISO 20022 CAMT.053 and pain.001 XML, SWIFT MT940, CSV exports, and OFX/QFX payloads. | |
| filename | No | Original filename of the payload; its extension (.xml, .csv, .ofx, .qfx, .mt940, .sta) selects the format when 'format' is omitted. Defaults to 'statement.xml'. | statement.xml |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||