Skip to main content
Glama
contabridge-mcp

contabridge-mcp

Book Norma 43 bank statement as journal

bank_to_journal
Read-onlyIdempotent

Convert bank statements, Norma 43 files, or CSV movement lists into journal entries, matching each movement to accounts and flagging unmatched items for review.

Instructions

Turn a bank statement (Norma 43, the bank's Excel/CSV export, or a movements list) into journal entries.

One entry per movement: abono -> Debe bank / Haber counterpart; cargo -> Debe counterpart / Haber bank. The counterpart comes from the first matching rule; with no match it goes to suspense_account (default 555 'partidas pendientes de aplicación', padded to the bank account length) and the movement is listed in unmatched, so nothing is guessed.

Args: bank_account: The 572 subaccount of the bank, e.g. "57200001" (for QuickBooks/Xero: that program's bank account name or code, and suspense_account is then required). target_format: csv (default) | a3 | contaplus_csv | contaplus_ascii | contasol | quickbooks_iif | quickbooks_csv | xero_csv. content / content_base64: The .n43 file (base64 for CP850/Latin-1 bytes), or the bank's CSV export (Excel saved as CSV: a header row with fecha + importe, or cargo + abono, and concepto). movements: Instead of a file, [{"date": "2026-03-05", "amount": "-121.00", "text": "IBERDROLA"}] for statements read from Excel or PDF (+ money in, - money out). open_items: Pending invoices to settle FIRST, before rules: [{"account": "43000012", "amount": "1210.00", "reference": "F-2026-031", "name": "Talleres Ruiz", "date": "2026-02-28"}]. Signed as the bank sees it (+ cobro de cliente, - pago a proveedor). A movement is booked against the customer/supplier subaccount only on the same amount AND a unique reference or name in the bank text (or a unique amount within window_days). Ties are listed in open_items.ambiguous and never guessed. invoices_to_journal returns these items ready to pass here. rules: Ordered list, first match wins. Each: {"account": "62800000", "contains": ["IBERDROLA"] or "regex": "...", "common_concept": "03" (AEB concept, e.g. 03 recibos, 04 transferencias, 12 comisiones), "direction": "cargo"|"abono", "concept": optional fixed text}. Text matching is case-insensitive over the movement description (own concept + record-23 texts). bank_accounts: For files with several bank accounts: {IBAN or last digits: "57200002"}. use_value_date: Date entries by value date instead of operation date. account_digits / account_split: Resize every subaccount (see convert_journal). start_entry_number: First entry number (default 1).

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": {
      "bank_account": "<bank_account>"
    },
    "name": "bank_to_journal"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesNo
contentNo
a3_formatNo
movementsNo
date_styleNo
open_itemsNo
window_daysNo
bank_accountYes
company_codeNo00001
account_splitNo
bank_accountsNo
decimal_commaNo
target_formatNocsv
xero_tax_rateNoNo VAT
account_digitsNo
content_base64No
use_value_dateNo
suspense_accountNo
start_entry_numberNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • addedInput schema / properties / movements
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Movements"
      +}
    • addedInput schema / properties / open_items
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Open Items"
      +}
    • addedInput schema / properties / window_days
      Added value: +{
      +  "default": 60,
      +  "title": "Window Days",
      +  "type": "integer"
      +}
  2. Changed2 schema fields changedv0.2.0
    • addedInput schema / properties / date_style
      Added value: +{
      +  "default": "",
      +  "title": "Date Style",
      +  "type": "string"
      +}
    • addedInput schema / properties / xero_tax_rate
      Added value: +{
      +  "default": "No VAT",
      +  "title": "Xero Tax Rate",
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses detailed behavior: one entry per movement, debit/credit mapping, first-matching-rule semantics, fallback to suspense_account, listing unmatched movements, and ambiguity handling in open_items. This is exactly the kind of matching and fallback logic an agent needs to invoke the tool correctly.

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?

The description is long but appropriately sized for a 19-parameter transformation tool. It is front-loaded with the core behavior and then structured as an Args section, with no obvious filler sentences.

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?

The description covers the main workflow, matching rules, fallback behavior, and output format selection, which is substantial for a complex tool. But given 19 parameters and no schema descriptions, the omission of several secondary parameters means it is not fully complete for an agent trying to use every option 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?

With 19 parameters and 0% schema description coverage, the description does well on key parameters such as bank_account, target_format, content, movements, open_items, rules, bank_accounts, use_value_date, suspense_account, and entry numbering. However, it leaves several parameters undocumented, including a3_format, date_style, company_code, decimal_comma, window_days, and xero_tax_rate, so it only partially compensates for the schema 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?

The description opens with a specific verb and resource: 'Turn a bank statement ... into journal entries.' It names the supported input forms (Norma 43, Excel/CSV export, movements list) and distinguishes the open_items flow from invoices_to_journal, giving an agent a clear sense of what the tool does.

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?

The definition gives clear usage context for the main workflow and explicitly points to invoices_to_journal for open_items and convert_journal for account resizing. It does not explicitly state when to prefer this over siblings such as pdf_bank_to_journal or bank_statement_csv, so it lacks full when-not guidance.

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