Income and expense trends
get_period_totalsUse this when the person asks for daily, weekly, or monthly trends in personal spending, business expenses, bank income, or net cash flow. Returns posted totals for one currency by time bucket, excluding internal transfers. Scope to the selected personal or business accounts. Trends are historical, not forecasts. direction picks money in (income), money out (expense), or both (all); granularity sets the bucket size within the from-to range, or the saved default period when dates are omitted. For a single total call get_cash_flow; for exactly two periods, compare_periods.
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": {
"granularity": "<granularity>",
"direction": "<direction>"
},
"name": "get_period_totals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Inclusive end, ISO date or timestamp, e.g. 2026-09-30. Calendar dates include the entire day. | |
| from | No | Inclusive start, ISO date or timestamp, e.g. 2026-09-01. Omit both dates to use the saved default period. | |
| currency | No | ISO currency, e.g. USD or CAD. Monetary summaries use one currency and never convert or combine currencies. | |
| accountId | No | Personal or business account id from list_accounts or a mention. Omit for all connected accounts; resolve the user's selected accounts first for business-only or personal-only reviews. | |
| direction | Yes | income = money in, expense = money out. | |
| granularity | Yes | Size of each time bucket: day, week, or month. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| setup | No | Present when bank data is missing, syncing, failing, or out of date. Lead the answer with it. | |
| period | Yes | ||
| periods | Yes | ||
| direction | Yes | ||
| granularity | Yes |