Analysis
get_analysisOne call for an analysis over a date range: the NET MOVEMENT per account per month or quarter (group_by 'account'), or the booking totals per counterparty per period (group_by 'counterparty' — the counterparty is the booking's description, so recurring items like a landlord, a telecom provider or a customer group together). Use it for trends, seasonality, 'which months were expensive', 'how much did we pay X over the year' and 'top counterparties'; for a statement's official figures use get_income_statement / get_balance_sheet. Only complete bookings count. The result is {home_currency, periods, rows}: periods are labels ('2026-01' or '2026-Q1', oldest first), each row has one cell per period in the same order plus total_cents, all integers in CENTS of the home currency — divide by 100. For accounts, a cell is debits minus credits in the period: positive means the account grew on its debit side (an expense incurred, an asset acquired), negative on its credit side (revenue earned, a liability taken on). Rows are sorted by total, largest absolute amount first, capped at 100 (rows_truncated says if more existed). cost_center_id restricts the figures to the legs carrying that cost center (ids from get_cost_centers).
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": {
"date_from": "<date_from>",
"date_to": "<date_to>",
"company_id": "<company_id>"
},
"name": "get_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_to | Yes | End of the range, YYYY-MM-DD, inclusive. | |
| group_by | No | Rows per account (default) or per counterparty (booking description). | |
| date_from | Yes | Start of the range, YYYY-MM-DD, inclusive. | |
| company_id | Yes | The company to work on — one of list_my_companies' company_id values. | |
| granularity | No | Period size (default month). Quarters are calendar quarters. | |
| cost_center_id | No | Only legs carrying this cost center (id from get_cost_centers). |