Skip to main content
Glama
calebl

YNAB MCP Server

by calebl

Spending By Category

ynab_spending_by_category
Read-only

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.

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. Totals are gross outflows: refunds and other inflows aren't netted, so they can differ from a category's activity in YNAB. With monthly: true, each category also gets a month-by-month series, its mean over full months, and how its last full month compares with the earlier ones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOnly return the top N categories by spend
monthsNoWith monthly: true, how many calendar months to cover, ending with the month of untilDate or the current month (default 6). sinceDate overrides it. Ignored without monthly.
planIdNoThe plan ID (optional, defaults to YNAB_PLAN_ID; budgetId is a deprecated alias)
monthlyNotrue adds the top-level months list and, on each category, monthly_totals (spend per month, aligned with months), average_monthly (mean over the full months) and change_pct (the last full month against the mean of the earlier full months). Months only partly in the range, or not over yet, are listed but left out of both figures. The range starts at sinceDate when given; otherwise it covers the number of calendar months set by months (default 6, at most 24), ending with untilDate or today. With many categories, pair it with limit.
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, or to today with monthly: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.0
    • addedInput schema / properties / monthly
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "true adds the top-level months list and, on each category, monthly_totals (spend per month, aligned with months), average_monthly (mean over the full months) and change_pct (the last full month against the mean of the earlier full months). Months only partly in the range, or not over yet, are listed but left out of both figures. The range starts at sinceDate when given; otherwise it covers the number of calendar months set by months (default 6, at most 24), ending with untilDate or today. With many categories, pair it with limit.",
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "true adds the top-level months list and, on each category, monthly_totals (spend per month, aligned with months), average_monthly (mean over the full months) and change_pct (the last full month against the mean of the earlier full months). Months only partly in the range, or not over yet, are listed but left out of both figures. The range starts at sinceDate when given; otherwise it covers the number of calendar months set by months (default 6, at most 24), ending with untilDate or today. With many categories, pair it with limit."
      +}
    • addedInput schema / properties / months
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "With monthly: true, how many calendar months to cover, ending with the month of untilDate or the current month (default 6). sinceDate overrides it. Ignored without monthly.",
      +      "maximum": 24,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "With monthly: true, how many calendar months to cover, ending with the month of untilDate or the current month (default 6). sinceDate overrides it. Ignored without monthly."
      +}
    • changedInput schema / properties / untilDate / anyOf
      Previous value: -[
      -  {
      -    "description": "End of the range, inclusive (ISO format: 2024-01-31). Defaults to no end date.",
      -    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "End of the range, inclusive (ISO format: 2024-01-31). Defaults to no end date, or to today with monthly: true.",
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / untilDate / description
      Previous value: -"End of the range, inclusive (ISO format: 2024-01-31). Defaults to no end date."New value: +"End of the range, inclusive (ISO format: 2024-01-31). Defaults to no end date, or to today with monthly: true."
  2. Addedv0.3.0

TDQS

Score is being calculated.