Skip to main content
Glama
YNAB MCP Server

YNAB MCP Server

by oliverames

Get Spending Trends

get_spending_trends
Read-onlyIdempotent

Analyze monthly net spending by category or payee, compare prior months, and flag unusual spending via median/MAD thresholds, including refunds, splits, and zero-activity months.

Instructions

Read-only monthly net spending by category or payee, with zero-activity months, refunds, split components and prior-month changes. Observational unusual-spending flags use >=3 prior complete months and an explicit median/MAD threshold; partial months are labeled and never flagged. Adds historical comparisons beyond recurring-charge/reconciliation tools.

Input Schema

NameRequiredDescriptionDefault
groupByNoGroup stable IDs by category (default) or payee.
budgetIdNo
sinceDateNoInclusive start YYYY-MM-DD; default six complete calendar months ago.
untilDateNoInclusive end YYYY-MM-DD; default previous calendar month's last day. Maximum 36 calendar months.
incomeCategoryIdsNoExplicit income IDs when internal metadata is ambiguous.
minAnomalyIncreaseNoMinimum dollar increase for an observational flag (default 50), combined with median/MAD thresholds.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds real behavioral content the annotations do not carry: zero-activity months are included, refunds reduce net, split components are accounted for, and partial months are labeled and never flagged. It also discloses the exact anomaly methodology (>=3 prior complete months, median/MAD threshold plus a minimum dollar increase), which is precisely the kind of 'how does it decide' detail an agent needs before trusting flags.

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?

Three sentences, no filler, and the core purpose is front-loaded in sentence one. Sentences two and three are dense with parenthetical and slash-joined terms ('median/MAD', 'recurring-charge/reconciliation') that take a beat to parse, but every clause carries substantive information rather than restating the name.

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

Completeness4/5

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

For a six-parameter, zero-required analytical tool with an output schema, the description covers purpose, inclusion semantics, and the anomaly-flag rule set, so an agent can call it correctly without reading source. The small remaining gap is routing guidance among the other analytical siblings (income/expense summary, budget health, recurring charges), which is left implicit.

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

Parameters3/5

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

Schema coverage is 83%, so groupBy, sinceDate, untilDate, incomeCategoryIds and minAnomalyIncrease are already documented inline, and the baseline is 3. The description reinforces the grouping dimension and the median/MAD concept behind minAnomalyIncrease but adds no syntax, default, or edge-case detail (e.g. behavior when sinceDate and untilDate conflict or exceed the 36-month cap) beyond what the schema states. Marginal added value only.

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

Purpose4/5

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

The first sentence names the resource precisely: monthly net spending, grouped by category or payee, with an explicit 'read-only' qualifier. It also enumerates inclusion rules (zero-activity months, refunds, split components, prior-month deltas), which lets an agent tell it apart from summary tools. The sibling differentiation in the last sentence is category-level ('recurring-charge/reconciliation tools') rather than naming detect_recurring_charges or audit_account_reconciliation directly, which keeps it short of a 5.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'Adds historical comparisons beyond recurring-charge/reconciliation tools' suggests the agent should reach for this when it needs multi-month trend history, and the anomaly-flag rules hint at a 'find unusual spending' use case. But there is no explicit when-to-use clause and no mention of get_income_expense_summary or get_budget_health, which are adjacent analytical siblings an agent must choose between. The reader has to infer the routing.

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