Skip to main content
Glama

finance

Statements: Parse a PDF statement

parse_statement
Read-onlyIdempotent
    Parse a base64-encoded PDF bank/credit-card/loan statement and return
    the extracted fields WITHOUT saving anything. Premium-only.

    This is step 1 of a two-step flow: the extracted values are reviewed
    with the user, and a separate apply step writes the confirmed values
    to a specific account. Nothing is persisted by this tool.

    Args:
        pdf_base64: The PDF file encoded as a base64 string (<= 5 MB
            decoded). Image-only/scanned PDFs aren't supported.

    Returns:
        ``{"success": True, "fields": {...}, "fields_found": N,
        "account_type_hint": "credit_card"|"mortgage"|...|None}`` where
        each entry in ``fields`` is
        ``{"value": "1234.56", "confidence": 0.9, "source_text": "...",
        "source": "regex"}`` (the same shape the REST parse returns). The
        ``value`` strings are the inputs the apply step accepts.
        On failure: ``{"error": "..."}`` (not Premium, bad base64, not a
        PDF, too large, or unparseable).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_base64Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial context beyond them: nothing is persisted, the tool is Premium-gated, there is a 5 MB decoded size limit, scanned PDFs are unsupported, and specific failure modes are enumerated. No contradictions with the annotation profile.

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?

Front-loads purpose, then the flow, then Args, then Returns. Every section earns its place: the Args and Returns blocks are necessary given 0% schema coverage and no output schema, and there is no 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?

With no output schema and no parameter descriptions in the schema, the description fully specifies input constraints, the exact return shape (fields/confidence/source_text/source, account_type_hint) and the error shape. Combined with annotations covering safety, nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the burden and does so well: the single parameter is base64-encoded PDF, capped at <=5 MB decoded, and constrained to non-scanned/machine-readable PDFs. An agent has everything needed to construct the argument correctly.

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 ('Parse a base64-encoded PDF bank/credit-card/loan statement') and immediately scopes the effect ('return the extracted fields WITHOUT saving anything'). It also distinguishes itself from the apply step, so the agent can separate it from apply_statement without opening either schema.

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 frames this as step 1 of a two-step flow whose output feeds a separate apply step, states the Premium-only requirement, and documents the when-not case (image-only/scanned PDFs aren't supported). The alternative (apply) and the precondition for using it are both named.

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