Skip to main content
Glama

ledger_get

Read-onlyIdempotent

A table of dated entries: its columns and what each is for, how many entries it holds, the days it spans, and which columns were filled from a feed and from what call. With no path, every table in the model. Entries are summarised, never dumped — recent shows the last few rows. To read a table's lines, not only its columns: where (a filter as in a LEDGER_ reading, e.g. source == "wise_usd" AND amount_value < 0), group_by (word columns, or a grain of the line's day: year, half, quarter, month, week, or period, the model's own), sum (number columns, worked-out ones included), reduce (a column brought to one value per group: last or first by day for a balance or a price, mean, min, max, count, distinct, or words — the one word, else each word with its count) — each group answers its count, its days, how many of its lines fill each column (which fields that kind of line carries), the sums and reductions, errors (cells holding an error, which no sum or reduction counts), and a few sample lines. Past 60 groups by a grain the latest periods are kept (earlier counts those left out; undated groups take only the room left, undatedLeftOut). A combined table is read as its rows. This is how to see each source's shape before writing the formula that reads it; never preview a write to count lines.

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": {
      "model": "<model>"
    },
    "name": "ledger_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
sumNoNumber columns to total per group, by local name.
pathNoThe section the table occupies, e.g. `fx`.
modelYesModel uid (`model_…`), from model_list.
whereNoOnly the lines this filter selects. Needs `path`.
recentNoHow many of the most recent entries to show. Default 5; 0 when grouping.
reduceNoColumns brought to one value per group, each by a reduction.
sampleNoLines to show per group. Default 2.
group_byNoWord columns by local name, or a grain of the line's day (`year`, `half`, `quarter`, `month`, `week`, `period`). Needs `path`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world, so the bar is lower, yet the description adds a lot: output is always summarised, per-group cap of 60 groups by grain with `earlier`/`undatedLeftOut` accounting, error cells that no sum counts, sample-row limiting, and that a combined table is read as its rows. These are non-obvious behavioural traits an agent would otherwise discover only by trial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is information-dense with no filler, but the structure is one long em-dash-laden paragraph and the first sentence is an elliptical fragment that reads more like a field list than a purpose statement. The pivot sentence "To read a table's lines, not only its columns:" is syntactically awkward and forces re-reading.

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?

With 8 parameters, no output schema, and non-trivial grouping/truncation behaviour, the description carries a heavy burden and mostly meets it: return shape, group caps, overflow counters, error cells, and undefined-date handling are all covered. Minor gaps remain around default behavior with a `path` but no grouping, and no explicit mention of any result-size limits beyond the 60-group rule.

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

Parameters4/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 goes beyond it by explaining what each parameter is for in aggregate terms — `where` with a concrete filter example, `group_by` grains including `period` being the model's own, `reduce` options with `last`/`first`/`words` semantics spelled out, and the meaning of each group's answer. Only mild ambiguity remains (whether `where`/`group_by` strictly require `path` is left to 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?

The description names the resource precisely (a ledger table of dated entries) and enumerates the concrete outputs: columns and their meaning, entry counts, day span, and feed provenance per column. It is specific but delivered as an elliptical noun phrase rather than a verb+resource statement, and it never names a sibling tool (e.g. values_get, financials_read) to contrast against.

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 real when-to-use context: see each source's shape before writing a formula that reads it, and explicitly "never preview a write to count lines." It also frames the summarised-vs-dumped choice ("Entries are summarised, never dumped — `recent` shows the last few rows"). The gap is that no alternative tool is named when a different read tool would be the right call.

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