Skip to main content
Glama

Convert a bank statement

convert_statement

Starts converting one bank or credit-card statement (PDF, scanned image, CSV, QIF, OFX/QFX) into reconciled transactions on the user's stmtai account. Pass the bytes as file_base64 (about 4 MB at most) or as an attached file object; with neither, the result is an upload_required handshake holding a presigned PUT URL (valid 15 minutes) and the website address where the user can upload instead. Limits: 20 MB per file, 60 pages per file, and at most 15 pages are charged for one statement. Returns immediately with status "processing"; the conversion takes 10–40 seconds, so call get_conversion with the returned conversion_id after poll_after_seconds. Pages are charged from the user's plan when the conversion succeeds; failed conversions are not charged. An account with no pages left is refused before anything is uploaded.

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": {
      "file_name": "<file_name>"
    },
    "name": "convert_statement"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoA file attached in the assistant (OpenAI file object). The server downloads it from download_url.
file_nameYesFile name with its extension, e.g. "jan-2026.pdf". Supported: PDF, PNG/JPG/WEBP/GIF images, CSV, QIF, OFX/QFX.
file_base64NoThe file bytes as standard base64 (no data: prefix). Inline files are limited to about 4 MB; larger files go through `file` or the website.

Output Schema

NameRequiredDescriptionDefault
limitsNo
statusYes
uploadNo
websiteNo
next_stepYes
conversion_idYes
poll_after_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag non-read-only and non-idempotent; the description adds the expensive-to-discover behavior: immediate return with status "processing", a 10–40 second conversion window, presigned URL validity of 15 minutes, page/file limits, charge-on-success with no charge on failure, and refusal before upload when pages are exhausted. That is the pricing and async contract an agent cannot get anywhere else.

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?

Front-loads the action and the three input modes before limits and billing, so the critical decision comes first. The prose is dense and runs long in a single paragraph, with several clauses chained together, which slightly hurts scanability but no sentence is filler.

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?

For a mutating, credit-consuming, asynchronous tool with a nested file object, the description covers inputs, limits, cost, timing, failure behavior, and the exact next call. Even though an output schema exists, it usefully characterizes the processing result and the upload_required handshake.

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%, so the baseline is 3, but the description adds real meaning the schema lacks: the parameters are alternatives rather than complements, inline base64 is capped near 4 MB while other paths allow 20 MB, and supplying neither triggers a handshake instead of an error. It does not explain the interaction between file_name and file.file_name, leaving a small gap.

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?

States a specific verb and resource ("starts converting one bank or credit-card statement") plus the input formats and the output ("reconciled transactions"). It clearly separates itself from the sibling get_conversion, which it names as the follow-up step rather than a substitute.

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 covers the three invocation paths (file_base64, attached file object, or neither → upload_required handshake) and tells the agent to call get_conversion with the returned conversion_id after poll_after_seconds. The only unmade comparison is against list_conversions, but the async workflow is fully spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources