Income statement
get_income_statementThe income statement (profit and loss): revenue and expenses over a date range (date_from to date_to, inclusive), as a nested tree of account groups and accounts. Sign convention in the raw values: revenue is POSITIVE and expenses NEGATIVE, so a group total is revenue plus (negative) expenses and a positive top-level result means a profit, a negative one a loss. Every row is a real account or group — no synthetic rows. Set both compare_from and compare_to to add the compare period and the difference. The tree is PRE-SUMMED by the server: a group row's values already include every account under it, so read a total off the group row itself and never add child rows up yourself. Every amount is an integer in CENTS of the company's home currency — divide by 100 and present francs with two decimals, never the raw integer. Each row has values.period_1 (the main period), plus values.period_2 and values.difference (period_1 - period_2) only when compare dates were sent.
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_income_statement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_to | Yes | End of the period, YYYY-MM-DD, inclusive. | |
| date_from | Yes | Start of the period, YYYY-MM-DD, inclusive. | |
| company_id | Yes | The company to work on — one of list_my_companies' company_id values. | |
| compare_to | No | End of the compare period, YYYY-MM-DD. Only takes effect together with compare_from. | |
| compare_from | No | Start of the compare period, YYYY-MM-DD. Only takes effect together with compare_to. | |
| show_all_accounts | No | Include accounts with no bookings (zero balances). Leave off unless the user asks about an account that is missing. |