Skip to main content
Glama
bankstatementparser-mcp

bankstatementparser-mcp

Detect statement format

detect_format
Read-onlyIdempotent

Identifies a bank statement's format from raw inline text and filename hint, returning the identifier required before parsing transactions.

Instructions

Detect which bank statement format an inline payload is.

Use this when you hold statement text but do not yet know its format,
to resolve the ``format`` identifier from the content plus filename
hint. Once the format is known, use ``parse_statement`` to read the
transactions.

Args:
    content: The raw statement text.
    filename: Original filename; its extension is the primary hint.

Returns:
    The detected format identifier.

Raises:
    ToolError: If the format cannot be detected.

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": {
      "content": "<content>"
    },
    "name": "detect_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe raw statement text to inspect, inline (not a file path). Supported formats include ISO 20022 CAMT.053 and pain.001 XML, SWIFT MT940, CSV exports, and OFX/QFX.
filenameNoOriginal filename of the payload; its extension is the primary detection hint. Recognised extensions: .xml, .csv, .ofx, .qfx, .mt940, .sta. Defaults to 'statement.xml'.statement.xml

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.0.16
    • addedInput schema / properties / content / description
      Added value: +"The raw statement text to inspect, inline (not a file path). Supported formats include ISO 20022 CAMT.053 and pain.001 XML, SWIFT MT940, CSV exports, and OFX/QFX."
    • addedInput schema / properties / filename / description
      Added value: +"Original filename of the payload; its extension is the primary detection hint. Recognised extensions: .xml, .csv, .ofx, .qfx, .mt940, .sta. Defaults to 'statement.xml'."
  2. First observedv0.0.14

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already establish that this is a safe, read-only, idempotent operation. Beyond that, the description usefully discloses that detection can fail with a ToolError and that filename extension is the primary hint, though it does not discuss confidence or fallback behavior.

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 purpose and usage, followed by compact Args, Returns, and Raises sections. Some of that material duplicates the schema and output schema, but the overall structure is clear and efficient.

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 the complete input schema, the output schema, and the read-only annotations, the description supplies the remaining useful context: when to use it, what hint drives detection, and how detection failures surface. Nothing essential for correct invocation is missing.

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%, so the schema already fully documents both content and filename. The description repeats that content is raw text and that filename extension is the primary hint, adding little beyond the schema.

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 uses a specific verb and resource: detect the format of an inline bank statement payload. It distinguishes itself from parse_statement by positioning detection as the step before parsing, so an agent can select it without ambiguity.

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 an explicit condition for use: when holding statement text but not yet knowing its format. It also names the next tool, parse_statement, once the format is known, leaving little ambiguity about workflow position.

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