Get spending summary
mofi_spending_summary_getUse this first for 'how much do I spend', monthly or weekly averages, and spending by category or merchant. Summarize debit spending over an explicit period of at most 366 days in one call: totals per month or ISO week (zero-spend periods included), the average over periods fully inside the range, and the top categories or merchants with the remainder. Totals use { amount, currency } with amount as an exact decimal string; Currencies remain separate; bank-converted ones count in the account's. Pending debits count by default and drop once posted. Internal transfers, card bill payments and investment moves are excluded by default and reported under excluded. Internal transfer is a simple heuristic: your category override is transfer, the provider category is 'Same person transfer', the operation code is an own-account transfer (incl. Pix to your own CPF), or a non-cancelled credit with the same currency and amount exists in another of your accounts within 3 days. A generic TRANSFER code alone is still spending. Card payments and investments match Mofi's classification: your override, else a bill-debit description, else the provider category rule, else known operation codes. Periods that have not ended yet are marked complete=false and left out of the average. meta.warnings flags connections that hold the same bank data. Breakdown keys follow mofi_spending_get group keys.
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": {
"mode": "<mode>",
"where": "<where>"
},
"name": "mofi_spending_summary_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| where | Yes | Inclusive period; optionally one account or one connection. | |
| interval | No | month | |
| breakdown | No | category | |
| breakdownLimit | No | ||
| includePending | No | ||
| includeInvestments | No | ||
| includeCardPayments | No | ||
| includeInternalTransfers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | ||
| mode | No | ||
| error | No | Typed error (code, message, retryable, details); set when isError is true. |