Skip to main content
Glama
sebastienrousseau

bankstatementparser-mcp

Parse statement transactions and summary

parse_statement
Read-onlyIdempotent

Parse raw bank statement text (CAMT.053, pain.001, MT940, CSV, OFX/QFX) into detailed transaction rows and a summary, including full counts and balances.

Instructions

Parse an inline statement payload into transaction rows and a summary.

Use this to read the full transaction detail plus the statement
balances from a payload. When you only need the balances/totals use
``summarize_statement`` instead, and to merely confirm a payload parses
without returning any rows use ``validate_statement``.

Args:
    content: The raw statement text.
    filename: Original filename; its extension selects the format
        when ``format`` is omitted.
    format: Explicit format override.
    limit: Optional cap on returned transaction rows.

Returns:
    A dict with the resolved ``format``, ``columns``, full
    ``transaction_count``, the (possibly truncated) ``transactions``
    as row dicts, and the statement ``summary``.

Raises:
    ValueError: If the format is unsupported or cannot be detected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional maximum number of transaction rows to return. The full 'transaction_count' is always reported even when the returned rows are truncated. When omitted, all rows are returned.
formatNoExplicit format identifier that overrides detection from the filename. Must be exactly one of: 'camt', 'pain001', 'csv', 'ofx', 'qfx', 'mt940' (see list_supported_formats). When omitted, the format is inferred from the filename extension.
contentYesThe raw statement text to parse, inline (not a file path). Accepts ISO 20022 CAMT.053 and pain.001 XML, SWIFT MT940, CSV exports, and OFX/QFX payloads.
filenameNoOriginal 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.0.19
    • changedInput schema / properties / format / description
      Previous value: -"Explicit format identifier that overrides detection from the filename. Must be exactly one of: 'camt', 'csv', 'mt940', 'ofx', 'pain001', 'qfx' (see list_supported_formats). When omitted, the format is inferred from the filename extension."New value: +"Explicit format identifier that overrides detection from the filename. Must be exactly one of: 'camt', 'pain001', 'csv', 'ofx', 'qfx', 'mt940' (see list_supported_formats). When omitted, the format is inferred from the filename extension."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "camt",
      -  "csv",
      -  "mt940",
      -  "ofx",
      -  "pain001",
      -  "qfx"
      -]New value: +[
      +  "camt",
      +  "pain001",
      +  "csv",
      +  "ofx",
      +  "qfx",
      +  "mt940"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"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."New value: +"Explicit format identifier that overrides detection from the filename. Must be exactly one of: 'camt', 'csv', 'mt940', 'ofx', 'pain001', 'qfx' (see list_supported_formats). When omitted, the format is inferred from the filename extension."
    • addedInput schema / properties / format / enum
      Added value: +[
      +  "camt",
      +  "csv",
      +  "mt940",
      +  "ofx",
      +  "pain001",
      +  "qfx"
      +]
  3. Changed4 schema fields changedv0.0.16
    • addedInput schema / properties / content / description
      Added value: +"The raw statement text to parse, inline (not a file path). Accepts ISO 20022 CAMT.053 and pain.001 XML, SWIFT MT940, CSV exports, and OFX/QFX payloads."
    • addedInput schema / properties / filename / description
      Added value: +"Original filename of the payload; its extension (.xml, .csv, .ofx, .qfx, .mt940, .sta) selects the format when 'format' is omitted. Defaults to 'statement.xml'."
    • addedInput schema / properties / format / description
      Added value: +"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."
    • addedInput schema / properties / limit / description
      Added value: +"Optional maximum number of transaction rows to return. The full 'transaction_count' is always reported even when the returned rows are truncated. When omitted, all rows are returned."
  4. First observedv0.0.14

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior, and the description adds genuinely useful context beyond them: format resolution precedence (filename extension vs explicit format override), truncation semantics (transactions possibly truncated while transaction_count stays full), and the ValueError raised for unsupported or undetectable formats. The Returns section also documents the exact response shape. No contradiction with annotations.

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

Conciseness5/5

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

The description is front-loaded with a one-line purpose, followed by compact usage guidance and terse Args/Returns/Raises sections. Every section earns its place; the Returns and Raises blocks carry real behavioral information rather than padding or repeating the schema.

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 4 parameters, a 6-value format enum, and 4 sibling tools, nothing an agent needs to invoke this correctly is missing: required content semantics, format inference and override, limit behavior, return structure, error behavior, and alternative tools are all covered. The output schema covers return values, and the description reinforces them regardless.

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 coverage is 100% and the schema descriptions are already rich (format enum values, accepted payload types, extension list), so the baseline is 3. The description nudges above baseline by adding the behavioral consequence of `limit` in the Returns section (transactions may be truncated but transaction_count is the full count) and by tying format failures to the Raises clause.

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 opening line 'Parse an inline statement payload into transaction rows and a summary' names a specific verb, resource, and delivered artifacts. It also differentiates from siblings by clarifying that this tool provides full transaction detail plus balances, while summarize_statement and validate_statement cover the reduced-scope cases.

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?

Explicitly states when to use this tool ('Use this to read the full transaction detail plus the statement balances') and gives concrete switch criteria: use summarize_statement when only balances/totals are needed, and validate_statement to merely confirm a payload parses. Alternatives are named, so an agent needs no inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.