Compute Account Balance
compute_account_balanceCalculate account balances from journal postings with optional client, dimension, and date filters. Use date ranges for opening, period, and closing balances, or group totals by client.
Instructions
Compute account balance from journal postings with optional client/dimension/date filters. With date_from, balance / debit_total / credit_total are the period figures; opening_balance_at_date_from, period_net and closing_balance give the balance before the window and at its end. group_by: "client" adds per-client rows (journal header client; journals without one form a clients_id null row).
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": {
"account_id": "<account_id>"
},
"name": "compute_account_balance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | Clear cached API/reference data first. | |
| date_to | No | End date (YYYY-MM-DD) | |
| group_by | No | "client": also return per-client rows (by journal header client) next to the unchanged totals. Not combinable with clients_id. | |
| date_from | No | Start date (YYYY-MM-DD) | |
| account_id | Yes | Account id from list_accounts. In the RIK chart the id is the account number itself (e.g. 2110, 8900). | |
| clients_id | No | Filter by client ID | |
| include_entries | No | Include individual entries in response (default false) | |
| accounts_dimensions_id | No | Filter to one dimension (sub-account) of the account, e.g. the Wise dimension of 1020. Dimension id from list_account_dimensions; must belong to account_id. |