General ledger
general_ledgerThe general ledger for a date range, for every account or one account (accountCode), with the same figures as Reports → General Ledger and its CSV. Per account: opening (the balance before from, from the first entry; there is no year-end close), the posted rows in date order (date, reference, memo, debit, credit, the running balance, journalEntryId), totalDebit/totalCredit for the range, movement and closing. Balances are signed by statement section (positive = a debit balance for assets and expenses, a credit balance for liabilities, equity and revenue), so closing equals that account's balance in trial_balance as of to. An account with no line in the range and a zero opening is left out and counted in accountsOmitted. At most 300 rows come back across all accounts, in account-code then date order. When more is true the rows are cut short, while every account's opening, totals and closing stay exact and hiddenRows on an account counts its lines not shown; a narrower range or a single accountCode returns the rest.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "general_ledger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| accountCode | No | One account code (exact, e.g. "1010"). Omit for every account. |