compare_spending_by_year
Analyze category spending trends across multiple years to identify patterns and track budget performance over time with visual comparisons.
Instructions
Compare spending for a category across multiple years.
Args:
budget_id: The ID of the budget (use 'last-used' for default budget)
category_id: The category ID to analyze
start_year: Starting year (e.g., 2020)
num_years: Number of years to compare (default: 5)
include_graph: Include terminal graph visualization (default: True)
Returns:
JSON string with year-over-year comparison including totals, changes, percentage changes, and optional graph
Input Schema
Name | Required | Description | Default |
---|---|---|---|
budget_id | Yes | ||
category_id | Yes | ||
include_graph | No | ||
num_years | No | ||
start_year | Yes |
Input Schema (JSON Schema)
{
"properties": {
"budget_id": {
"title": "Budget Id",
"type": "string"
},
"category_id": {
"title": "Category Id",
"type": "string"
},
"include_graph": {
"default": true,
"title": "Include Graph",
"type": "boolean"
},
"num_years": {
"default": 5,
"title": "Num Years",
"type": "integer"
},
"start_year": {
"title": "Start Year",
"type": "integer"
}
},
"required": [
"budget_id",
"category_id",
"start_year"
],
"type": "object"
}