Skip to main content
Glama
calebl

YNAB MCP Server

by calebl

Spending By Category

ynab_spending_by_category
Read-only

Get total spending per category over a chosen date range, ranked from highest to lowest. Split transactions are counted and transfers between own accounts are excluded.

Instructions

Totals spending per category over a date range, biggest spend first. Splits are counted through their subtransactions, and transfers between your own accounts are excluded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOnly return the top N categories by spend
planIdNoThe plan ID (optional, defaults to YNAB_PLAN_ID; budgetId is a deprecated alias)
budgetIdNoDeprecated alias of planId (still accepted)
sinceDateNoStart of the range, inclusive (ISO format: 2024-01-01). Defaults to 30 days ago.
untilDateNoEnd of the range, inclusive (ISO format: 2024-01-31). Defaults to no end date.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the tool read-only and non-destructive, and the description adds meaningful behavioral details: split transactions are counted via subtransactions, and transfers between own accounts are excluded. These nuances significantly affect results and are not inferable from annotations or schema.

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

Conciseness5/5

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

Two dense, purposeful sentences with no filler. The core behavior and ordering are front-loaded, and the two edge-case clarifications are packed into a single second sentence.

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?

The description covers the essential behavior, ordering, split handling, and transfer exclusion, which is enough for an agent to select and invoke the tool correctly. There is no output schema, but the return concept is simple and obvious from the title; explicitly describing response fields would push this to a 5.

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?

The input schema documents all five parameters with full descriptions and defaults, so the description does not need to repeat them. It adds no parameter-specific meaning beyond what the schema already provides, matching the baseline for high schema coverage.

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?

The description clearly states the tool's action ('Totals spending per category over a date range') and ordering ('biggest spend first'), naming the exact resource and operation. It also distinguishes itself from the sibling ynab_spending_by_payee by explicitly focusing on categories rather than payees.

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

Usage Guidelines4/5

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

The description establishes clear analytical context: this is for category-level spending totals over a date range, which lets an agent separate it from transaction-listing and mutation tools. It does not explicitly name alternatives or say when not to use it, so it falls just short of a 5.

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