Analyze Spending
analyze_spendingAnalyze spending for yourself, a group, or a friend: see category breakdowns, monthly trends, top transactions, and settlement plans. Optionally generate an HTML dashboard.
Instructions
Deterministic spending analytics for the current user, a group, or a friend.
All numbers are computed in Python (never estimated by the model): category breakdown, monthly trend, owed-vs-paid ("mine vs split"), transaction ledger, top transactions, and — for groups — per-member comparison, category×member matrix, and a minimum-transaction settlement plan. Every result includes a reconciliation check (shares must sum to cost) and a multi-currency guard.
target_type: "me" (all your expenses), "group" (needs target_id=group_id),
or "friend" (needs target_id=friend user_id).
dated_after / dated_before: ISO 8601 date filters (optional).
generate_dashboard: if True, also writes a self-contained HTML dashboard and
returns its file path in dashboard_path.
Perspective is always the authenticated user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| target_id | No | ||
| dated_after | No | ||
| target_type | No | me | |
| dated_before | No | ||
| generate_dashboard | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||