Spending report
spending_reportAggregate the caller's spending over a date range, computed SERVER-side in SQL (never make the agent sum hundreds of rows). Required: 'from' and 'to' (YYYY-MM-DD) and 'group_by' (category/merchant/day/week/month). Optional 'category' / 'merchant' filters narrow the set. Returns {groups:[{key,total,receipt_count}], grand_total, currency}. Phase-1 single-currency: a range spanning multiple currencies is rejected with a clear validation error.
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>",
"group_by": "<group_by>"
},
"name": "spending_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| category | No | ||
| group_by | Yes | ||
| merchant | No |