ledger_get
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
| Name | Required | Description | Default |
|---|---|---|---|
| sum | No | Number columns to total per group, by local name. | |
| path | No | The section the table occupies, e.g. `fx`. | |
| model | Yes | Model uid (`model_…`), from model_list. | |
| where | No | Only the lines this filter selects. Needs `path`. | |
| recent | No | How many of the most recent entries to show. Default 5; 0 when grouping. | |
| reduce | No | Columns brought to one value per group, each by a reduction. | |
| sample | No | Lines to show per group. Default 2. | |
| group_by | No | Word columns by local name, or a grain of the line's day (`year`, `half`, `quarter`, `month`, `week`, `period`). Needs `path`. |