Skip to main content
Glama
sebastienrousseau

bankstatementparser-mcp

Summarize statement balances

summarize_statement
Read-onlyIdempotent

Extract opening and closing balances and totals from raw bank statement text, omitting transaction details. Provide content inline; format is auto-detected from filename or specified explicitly.

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

TableJSON Schema
NameRequiredDescriptionDefault
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 summarize, 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. Changed3 schema fields changedv0.0.16
    • addedInput schema / properties / content / description
      Added value: +"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."
    • 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."
  4. First observedv0.0.14

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idemponentHint, and destructiveHint=false; the description adds meaningful behavioral details beyond annotations, including that Decimal values are stringified in the result, that ValueError is raised for unsupported/undetectable formats, and that the input must be inline text rather than a file path. 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.

Conciseness4/5

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

The description is front-loaded with the primary purpose and usage guidance, and the Args/Returns/Raises sections are compact. It earns a igh score, though the Args section slightly duplicates richer schema descriptions, keeping it from a perfect 5.

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?

With a full input schema, output schema, strong annotations, and explicit sibling routing, the description covers what the tool does, when to use it, what it returns, and what can go wrong. Nothing essential is missing for an agent to invoke it correctly.

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 coverage is 100%, and each parameter already has a thorough description, including the format enum and filename extension behavior. The Args section in the description is a concise restatement but does not add significant meaning beyond the schema, so the baseline 3 applies.

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 states a specific verb plus resource: 'summarize an inline statement's balances and totals only.' It clearly distinguishes this tool from parse_statement by noting that it omits per-transaction rows, so an agent can select correctly even before reading schemas.

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?

It gives explicit when-to-use guidance ('when you need just the opening/closing balances, currency, and other summary fields') and explicitly names the alternative ('use parse_statement instead') for full transaction detail. It also clarifies format detection behavior and the role of filename vs format.

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