Skip to main content
Glama

Beancount.io

Read Ledger File Contents

readLedgerFiles
Read-onlyIdempotent

Read one or more beancount ledger files in a single call. content is raw text; the 1-based startLine/endLine it spans and the file's totalLines come alongside it, not in the text. Use start_line/end_line per file to limit tokens for large files. A file that is not valid UTF-8 comes back with lossy: true: its undecodable bytes read as U+FFFD, and edits to it are refused.

Input Schema

NameRequiredDescriptionDefault
filesYesOne or more files to read. Each entry may limit to a line range.
ledgerNoTarget ledger as owner/name. Required for an unpinned credential; defaults to the credential's ledger restriction.

Output Schema

NameRequiredDescriptionDefault
okYes
errorNo
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds real behavioral content: content is raw text, line numbers and totalLines are returned alongside rather than embedded, and non-UTF-8 files return lossy: true with U+FFFD substitution and refused edits. That lossy/edit-refusal rule is exactly the kind of constraint annotations cannot express. It stops short of describing per-file error behavior when a path is missing.

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?

Three tight sentences, front-loaded with the core action, then return shape, then the token-limit advice and the encoding edge case. Every sentence carries distinct information with no restatement of the title or schema.

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

Completeness4/5

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

An output schema exists, so return values needn't be re-explained, but the description still usefully flags the lossy/UTF-8 case and the token-limiting strategy. Minor gaps remain: behavior on a nonexistent path and whether the files array is processed atomically or partially.

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 coverage is 100%, so the baseline is 3. The description adds the rationale for start_line/end_line ('to limit tokens for large files') and clarifies that line spans are 1-based, but says nothing about the `ledger` parameter or multi-file result ordering, so it barely exceeds the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource — read beancount ledger files — and adds batch scope ('one or more ... in a single call'), which tells an agent this is not a single-file read. It does not, however, name a sibling such as listLedgerFiles to make the discovery-vs-read distinction explicit.

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 only usage guidance is operational: 'Use start_line/end_line per file to limit tokens for large files.' There is no statement of when to prefer this over listLedgerFiles or listLedgerEntries, nor any exclusion or prerequisite (e.g. how to obtain a valid path).

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.