Income statement
income_statementProfit and loss for a period (from to to): revenue, cost of goods sold, gross profit, expenses and net income. An optional comparison comes in the same call: compare 'previous_period' (the equal-length window just before) or 'same_period_last_year' (the same dates a year earlier), or an explicit window with both compareFrom and compareEnd. It then returns both periods' full statements and, for every line and total, deltaCents and deltaPct, computed server-side in integer cents. deltaPct is null when the earlier figure is zero (no comparable base), and is measured against the absolute earlier figure, so a movement out of a loss keeps its sign. windows gives both windows, their day counts, whether they are the same length (equalLength) and whether either is still open (running to today or beyond); notes states this in words, including when a partial period is set against a full one. On periodic stock, when goods with a cost were sold in the window, cost of goods sold is RM 0 and there has been no stock count this financial year, a notes line says so: gross profit is then overstated until a stock take, or recording cost on every sale (Settings → Accounting).
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": "income_statement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| compare | No | Named comparison window. 'previous_period' = the equal-length window immediately before from…to; 'same_period_last_year' = the same dates one year earlier. Omit for no comparison. | |
| compareEnd | No | End of an explicit comparison window; needs `compareFrom`. | |
| compareFrom | No | Start of an explicit comparison window; needs `compareEnd`, and overrides `compare`. |