Skip to main content
Glama
contabridge-mcp

contabridge-mcp

Book bank statement PDF as journal

pdf_bank_to_journal
Read-onlyIdempotent

Convert digital bank statement PDFs into journal entries or Norma 43 files, validating balances and flagging mismatched rows for reliable bookkeeping import.

Instructions

Read a digital bank statement PDF (Revolut, Wise, N26, CaixaBank, BBVA, Santander... downloaded from online banking, with selectable text) and turn it into journal entries or a Norma 43 file.

Deterministic: the movements table is located by its header (Fecha, Concepto, Cargo/Abono or Importe, Saldo) and each value is read from its column. No OCR and no AI: scanned PDFs are refused, not guessed. Every row is checked: previous balance + amount = printed balance, and opening + money in - money out = closing balance. Rows that do not add up are booked but listed in flagged_rows with status "mismatch"; rows whose sign (cargo/abono) cannot be proven go to status "review" and are NOT booked. Check balance_check.balanced.

Args: content_base64: The PDF file bytes in base64. target_format: contasol (APU.ods, default) | a3 | contaplus_csv | contaplus_ascii | csv | quickbooks_iif | quickbooks_csv | xero_csv | norma43 (a .n43 file to import in any program that reads Cuaderno 43). bank_account: The 572 subaccount of the bank (default 57200001). rules / suspense_account / open_items / window_days: As in bank_to_journal. strict_balance: true refuses to produce any file (and charges nothing) unless every row and the closing balance add up. account_ccc: For norma43 when the PDF has no Spanish IBAN: 20-digit CCC for record 11. holder: Account holder name for the Norma 43 header (optional).

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_base64": "<content_base64>"
    },
    "name": "pdf_bank_to_journal"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesNo
holderNo
a3_formatNo
date_styleNo
open_itemsNo
account_cccNo
window_daysNo
bank_accountNo57200001
company_codeNo00001
account_splitNo
decimal_commaNo
target_formatNocontasol
xero_tax_rateNoNo VAT
account_digitsNo
content_base64Yes
strict_balanceNo
use_value_dateNo
suspense_accountNo
start_entry_numberNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.3/5.0
Behavior5/5

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

The annotations already declare readOnly/closed-world/idempotent, yet the description adds substantial operational detail: header-based deterministic extraction, no OCR, two arithmetic verification rules, the three row statuses (booked, mismatch, review) and the fact that 'review' rows are NOT booked. It also discloses that strict_balance costs nothing when it refuses, which is billing behavior an agent could not otherwise know.

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?

Structure is deliberately layered — purpose, then determinism/verification semantics, then an Args block — with the most decision-relevant facts front-loaded. Sentences are dense but each carries distinct information; nothing is padding, and the 'As in bank_to_journal' shorthand avoids re-listing shared parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the description is not obligated to explain return shapes, though it helpfully names `flagged_rows` and `balance_check.balanced` as fields to inspect. Against a 19-parameter tool with zero schema description coverage, however, nine undocumented parameters leave real gaps an agent would have to guess at.

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 0%, so the description carries the burden for 19 parameters. It documents about nine of them, including a full enumeration of target_format values that the schema lacks entirely, but leaves a3_format, date_style, company_code, account_split, decimal_comma, xero_tax_rate, account_digits, use_value_date and start_entry_number completely unexplained in both description and 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?

Opening sentence names a specific verb+resource pair (read a bank statement PDF, turn it into journal entries or a Norma 43 file) and narrows the input class with bank names and 'selectable text'. It is distinguishable from bank_to_journal and bank_statement_csv purely from this text, including the explicit definition of what kind of PDF it accepts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear applicability condition ('digital ... with selectable text') and an exclusion ('scanned PDFs are refused, not guessed'), which routes the agent away from unusable inputs. What it does not do is explicitly contrast with named siblings such as bank_to_journal or bank_statement_csv, so the agent must infer which tool to reach for when the source is CSV rather than PDF.

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