Mit forbrug
get_spending_insightsUse this when the user asks how much they have spent on groceries, e.g. this month, per chain or per category. Returns the spending on the receipts Goma has synced from the user's connected store accounts, as in the Goma app's Indsigter: total, per month, per chain and per department, plus the discounts documented on the receipts. Amounts are in DKK and cover whole calendar months, at most 12.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_spending_insights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Any day in the last month (YYYY-MM-DD). Defaults to today. | |
| from | No | Any day in the first month (YYYY-MM-DD). Defaults to 12 months back. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chains | Yes | Spending per chain, largest first. | |
| months | Yes | Every month of the period, oldest first; months without receipts are 0. | |
| toMonth | Yes | Last calendar month covered (YYYY-MM); the current month runs to today. | |
| fromMonth | Yes | First calendar month covered (YYYY-MM). | |
| itemCount | Yes | Sum of quantities on product lines. | |
| categories | Yes | Spending per department (e.g. Mejeri), largest first. | |
| totalSpent | Yes | DKK paid on the period's receipts. | |
| hasReceipts | Yes | The user has receipts in Goma. | |
| receiptsInfo | Yes | Set when the user has no receipts: how receipts reach Goma (store accounts connected in the Goma app). | |
| totalSavings | Yes | DKK of discounts documented on the receipts (Sparet in the app). |