Skip to main content
Glama
ledgerbridge-mcp

ledgerbridge-mcp

audit_double_entry_ledger_balance

Read-onlyIdempotent

Audits Beancount and hledger ledger files offline by verifying every transaction's postings sum to zero using exact integer minor-unit math, avoiding floating-point drift.

Instructions

Audits Beancount (.bean) or hledger (.journal) double-entry ledger text offline using exact BigInt minor-unit math to verify that every transaction satisfies SUM(postings) === 0 without floating-point drift.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_double_entry_ledger_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathNoOptional local path to a .bean, .beancount, or .journal file when ledgerText is omitted.
filenameNoOptional display filename attached to audit results.
ledgerTextNoRaw Beancount (.bean) or hledger (.journal) text to audit in memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the description's job is to add context — and it does: work is done fully offline, arithmetic uses exact BigInt minor units, and there is no floating-point drift. It does not say what a failed audit returns or how malformed ledger text is handled, which keeps it below a 5.

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?

A single front-loaded sentence that leads with the verb and resource, then layers the math guarantee and the invariant. Every clause carries information; there is no filler or restatement of the title.

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?

For a read-only validation tool with no output schema, the description never indicates what the audit returns (pass/fail, per-transaction diagnostics, mismatch details), which an agent needs to interpret results. Parameter coverage is complete via the schema, so the gap is limited to the result side.

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% and all three parameter docs already explain filePath vs ledgerText fallback and the display filename. The description adds no additional parameter meaning (e.g., precedence rules beyond 'when ledgerText is omitted', or path resolution behavior), so the baseline 3 applies.

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 (audits) and resource (Beancount/hledger double-entry ledger text) plus the exact invariant being checked (SUM(postings) === 0). This is unambiguous and cannot be confused with the sibling tools (transfer detection, OFX fitid generation, statement reconciliation).

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

Usage Guidelines3/5

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

The description implies when to use it (validating a .bean/.journal ledger's balance) but never states exclusions, prerequisites, or how it relates to the sibling reconciliation/transfer tools. There is no explicit 'use this instead of X when Y' routing, so guidance is implied rather than stated.

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