spending_by_category
Get a spending breakdown by expense category for any date range, with optional monthly, quarterly, or yearly grouping. Choose compact text or structured JSON output for reporting or analysis.
Instructions
Get spending breakdown by expense category for a period.
Returns a compact aligned text table by default. Use verbose=true for the structured dict (programmatic consumers, plotting).
Args: start_date: Start of period (YYYY-MM-DD), inclusive. No calendar snapping — for calendar-month figures pass full month boundaries (e.g. 2026-05-01 to 2026-07-31). end_date: End of period (YYYY-MM-DD), inclusive. depth: Hierarchy depth for grouping (1 = top-level categories, 2 = subcategories) verbose: If false (default), compact text output — optimized for reading and token efficiency. If true, structured JSON, for when you need machine-readable fields rather than a report. group_by: Optional "month", "quarter", or "year" — split the range into sub-period columns and return a multi-period TSV table (category rows, one column per period plus Total and Avg). Overrides verbose.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| verbose | No | ||
| end_date | Yes | ||
| group_by | No | ||
| start_date | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |