Skip to main content
Glama
avenir-mcp

avenir-mcp

Spending trends

get_spending_trends
Read-onlyIdempotent

Compare monthly spending by category over past months in a YNAB budget to see whether expenses like groceries are rising or to spot month-to-month changes.

Instructions

Spending per category, month by month, over the last N months.

Use it for "is my grocery spending going up?" or to compare months. months_count counts back from the current month, included: the default 3 gives this month and the two before it, and the current one is still partial. A plan younger than that gives the months it holds. The result maps each category name to its spending month by month, oldest first, as a positive number in currency units. For a single month use get_category_balances or get_budget_vs_actual; for the months ahead, forecast_balance. One YNAB request for the list of months, then one per month, so a year of months costs twelve requests; changes nothing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "plan_id": "<plan_id>"
    },
    "name": "get_spending_trends"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYesYNAB plan id or 'last-used'.
months_countNoNumber of past months to include, 1 to 24 (default 3).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/idempotent annotations by disclosing the API cost model ('one request for the list of months, then one per month'), the partial current month, and the truncated history for young plans — real behavioral traits an agent can't infer from schema. Docked slightly because return-value description partly duplicates the existing output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then usage, then mechanics, then alternatives — good ordering. Slightly long; the sentence describing the return map restates what the output schema already provides and could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only, two-parameter analytics tool with an output schema, nothing an agent needs is missing: scope, defaults, edge cases (partial month, young plan), cost, side-effect status, and alternatives are all present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds genuine semantics: months_count counts back inclusively from the current (partial) month, default 3 covers this month plus two prior, and a younger plan yields only the months it has. That is meaning beyond the schema's 'number of past months, 1 to 24'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+shape: 'Spending per category, month by month, over the last N months', and immediately frames a concrete user question ('is my grocery spending going up?'). This clearly distinguishes it from get_monthly_summary, get_category_balances and get_budget_vs_actual.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: single month → get_category_balances or get_budget_vs_actual; future months → forecast_balance. It also states the comparative use case, so both when-to-use and when-not-to-use are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.