run_insight_query
Compute an analytics insight (a single value, a comparison, a breakdown, or a time-series) over a filtered period of transactions, from an ad-hoc spec, WITHOUT saving it. Use this to answer one-off analytical questions like 'how much did I spend on Dining last month' or 'compare income vs expense this year'. If the user wants to keep the result pinned on their dashboard, use propose_saved_insight instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The visualization spec describing what to compute. vizType is one of: 'value' (single number), 'comparison' (template income_vs_expense / period_over_period, or custom A/B), 'chart_time' (bucketed time series), 'breakdown' (top groups by category/envelope/account/type), 'table' (list of N transactions). Always set filter.period - use relative.value='this_month' / 'last_30_days' etc. unless the user gave explicit dates. |