Skip to main content
Glama
YNAB MCP Server

YNAB MCP Server

by rgarcia

Gettransactionsbycategory

getTransactionsByCategory

Retrieves non-pending YNAB transactions for a specific category within a date range. Use it to review spending history or filter for unapproved and uncategorized transactions.

Instructions

Returns all transactions for a specified category, excluding any pending transactions

IMPORTANT: this can return thousands of transactions and overflow your context. Always pass since_date (and until_date when you know it) covering only the dates you need, such as the last 7 to 30 days. Without since_date, YNAB returns a full year. Pass type="unapproved" or type="uncategorized" when you only need those transactions.

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>",
      "category_id": "<category_id>"
    },
    "name": "getTransactionsByCategory"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoIf specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
plan_idYesThe id of the plan. "last-used" can be used to specify the last used plan and "default" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
since_dateNoIf specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified.
until_dateNoIf specified, only transactions on or before this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
category_idYesThe id of the category
last_knowledge_of_serverNoThe starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / since_date / description
      Previous value: -"If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30)."New value: +"If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30). Defaults to one year ago when not specified."
    • addedInput schema / properties / until_date
      Added value: +{
      +  "description": "If specified, only transactions on or before this date will be included.  The date should be ISO formatted (e.g. 2016-12-30).",
      +  "format": "date",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does well: it warns that the call may return thousands of transactions and overflow context, and that YNAB defaults to a full year without since_date. It never mentions the last_knowledge_of_server incremental-sync behavior or response ordering or completeness, which is why this is a 4 rather than a 5.

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?

The warning about context overflow is front-loaded, the date-range guidance follows, and the type-filter tip comes last. No sentence is filler; every clause either sets scope or changes how the agent should call the tool.

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 6-param read tool with no annotations and no output schema, the description covers the two risks an agent must know: unbounded result size and the one-year default window. It does not explain the last_knowledge_of_server incremental contract or anything about the returned payload shape, which leaves a modest gap.

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 description coverage is 100%, so the baseline is 3. The description adds practical semantics beyond the schema: it frames since_date/until_date as context-safety guards, not just date filters, and explains when each type enum value is useful. It leaves last_knowledge_of_server unexplained, which is otherwise only defined in the schema.

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 description gives a specific verb and resource ('Returns all transactions for a specified category') plus a scoping detail ('excluding any pending transactions'). The name and stated purpose are enough for an agent to distinguish it from the by-account/by-month/by-payee siblings, but the description never names an alternative explicitly.

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 supplies conditional usage guidance: pass since_date (and until_date when known) covering only the date range needed, and use type="unapproved"/"uncategorized" when only those transactions are wanted. It stops short of telling the agent when to prefer a different tool, such as the by-account or by-payee variants, so there is no explicit exclusion.

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