Skip to main content
Glama
calebl

YNAB MCP Server

by calebl

Create Transaction

ynab_create_transaction

Create a new transaction in your YNAB plan with date, amount, account, and payee; optionally assign a category or split across categories.

Instructions

Creates a new transaction in your YNAB plan. The account can be given as accountId or accountName, and the category as categoryId or categoryName - names are fuzzy-matched against the plan. Either payeeId or payeeName must also be provided. To split the transaction across categories, pass subtransactions instead of a category; their amounts must add up to the transaction amount.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesThe date of the transaction in ISO format (e.g. 2024-03-24)
memoNoA memo/note for the transaction (optional)
amountYesThe amount in dollars (e.g. -10.99 for money spent, 10.99 for money received)
planIdNoThe plan ID (optional, defaults to YNAB_PLAN_ID; budgetId is a deprecated alias)
clearedNoThe cleared status of the transaction (optional, defaults to uncleared)
payeeIdNoThe id of the payee (optional if payeeName is provided)
approvedNoWhether the transaction is approved (optional, defaults to false)
budgetIdNoDeprecated alias of planId (still accepted)
accountIdNoThe id of the account to create the transaction in (optional if accountName is provided)
flagColorNoThe transaction flag color, or an empty string to clear the flag (optional)
payeeNameNoThe name of the payee (optional if payeeId is provided). YNAB creates the payee if it does not exist.
categoryIdNoThe category id for the transaction (optional)
accountNameNoThe name of the account, matched loosely against your accounts (e.g. 'ally checking'). Optional if accountId is provided.
categoryNameNoThe name of the category, matched loosely against your categories (e.g. 'groceries'). Optional; ignored if categoryId is provided.
subtransactionsNoSplits the transaction across categories, in the same shape ynab_get_transactions returns. Needs at least two entries whose amounts sum to amount; omit categoryId/categoryName when splitting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • addedInput schema / properties / subtransactions
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Splits the transaction across categories, in the same shape ynab_get_transactions returns. Needs at least two entries whose amounts sum to amount; omit categoryId/categoryName when splitting.",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "The split amount in dollars, signed like the transaction amount",
      +            "type": "number"
      +          },
      +          "category_name": {
      +            "description": "The split's category name, matched loosely against your categories (optional)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "memo": {
      +            "description": "A memo for this split (optional)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "payee_name": {
      +            "description": "A payee for this split, if different from the transaction's (optional)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "minItems": 2,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Splits the transaction across categories, in the same shape ynab_get_transactions returns. Needs at least two entries whose amounts sum to amount; omit categoryId/categoryName when splitting."
      +}
  2. Changed30 schema fields changedv0.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / accountId / anyOf
      Added value: +[
      +  {
      +    "description": "The id of the account to create the transaction in (optional if accountName is provided)",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / accountId / description
      Previous value: -"The id of the account to create the transaction in"New value: +"The id of the account to create the transaction in (optional if accountName is provided)"
    • removedInput schema / properties / accountId / type
      Removed value: -"string"
    • addedInput schema / properties / accountName
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "The name of the account, matched loosely against your accounts (e.g. 'ally checking'). Optional if accountId is provided.",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The name of the account, matched loosely against your accounts (e.g. 'ally checking'). Optional if accountId is provided."
      +}
    • changedInput schema / properties / amount / description
      Previous value: -"The amount in dollars (e.g. 10.99)"New value: +"The amount in dollars (e.g. -10.99 for money spent, 10.99 for money received)"
    • addedInput schema / properties / approved / anyOf
      Added value: +[
      +  {
      +    "description": "Whether the transaction is approved (optional, defaults to false)",
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / approved / type
      Removed value: -"boolean"
    • addedInput schema / properties / budgetId / anyOf
      Added value: +[
      +  {
      +    "description": "Deprecated alias of planId (still accepted)",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / budgetId / description
      Previous value: -"The id of the budget to create the transaction in (optional, defaults to the budget set in the YNAB_BUDGET_ID environment variable)"New value: +"Deprecated alias of planId (still accepted)"
    • removedInput schema / properties / budgetId / type
      Removed value: -"string"
    • addedInput schema / properties / categoryId / anyOf
      Added value: +[
      +  {
      +    "description": "The category id for the transaction (optional)",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / categoryId / type
      Removed value: -"string"
    • addedInput schema / properties / categoryName
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "The name of the category, matched loosely against your categories (e.g. 'groceries'). Optional; ignored if categoryId is provided.",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The name of the category, matched loosely against your categories (e.g. 'groceries'). Optional; ignored if categoryId is provided."
      +}
    • addedInput schema / properties / cleared / anyOf
      Added value: +[
      +  {
      +    "description": "The cleared status of the transaction (optional, defaults to uncleared)",
      +    "enum": [
      +      "cleared",
      +      "uncleared",
      +      "reconciled"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / cleared / description
      Previous value: -"Whether the transaction is cleared (optional, defaults to false)"New value: +"The cleared status of the transaction (optional, defaults to uncleared)"
    • removedInput schema / properties / cleared / type
      Removed value: -"boolean"
    • addedInput schema / properties / date / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • addedInput schema / properties / flagColor / anyOf
      Added value: +[
      +  {
      +    "description": "The transaction flag color, or an empty string to clear the flag (optional)",
      +    "enum": [
      +      "red",
      +      "orange",
      +      "yellow",
      +      "green",
      +      "blue",
      +      "purple",
      +      ""
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / flagColor / description
      Previous value: -"The transaction flag color (red, orange, yellow, green, blue, purple) (optional)"New value: +"The transaction flag color, or an empty string to clear the flag (optional)"
    • removedInput schema / properties / flagColor / type
      Removed value: -"string"
    • addedInput schema / properties / memo / anyOf
      Added value: +[
      +  {
      +    "description": "A memo/note for the transaction (optional)",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / memo / type
      Removed value: -"string"
    • addedInput schema / properties / payeeId / anyOf
      Added value: +[
      +  {
      +    "description": "The id of the payee (optional if payeeName is provided)",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / payeeId / type
      Removed value: -"string"
    • addedInput schema / properties / payeeName / anyOf
      Added value: +[
      +  {
      +    "description": "The name of the payee (optional if payeeId is provided). YNAB creates the payee if it does not exist.",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / payeeName / description
      Previous value: -"The name of the payee (optional if payeeId is provided)"New value: +"The name of the payee (optional if payeeId is provided). YNAB creates the payee if it does not exist."
    • removedInput schema / properties / payeeName / type
      Removed value: -"string"
    • addedInput schema / properties / planId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "The plan ID (optional, defaults to YNAB_PLAN_ID; budgetId is a deprecated alias)",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The plan ID (optional, defaults to YNAB_PLAN_ID; budgetId is a deprecated alias)"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "accountId",
      -  "date",
      -  "amount"
      -]New value: +[
      +  "date",
      +  "amount"
      +]
  3. Addedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=true, so the write/non-idempotent profile is covered. The description's additions (fuzzy matching, split sum rule, payee requirement) largely restate schema text and omit genuinely useful behavior such as duplicate re-submission risk or the account/category resolution failure mode, so it adds modest value.

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?

Four sentences, front-loaded with the purpose and then the mutually-exclusive parameter rules; each sentence carries information. Slightly dense with parenthetical-style alternatives but no filler.

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 15-parameter, mutation-heavy tool with no output schema, the description covers creation semantics, the id/name alternatives, payee requirement and split mechanics. It does not cover return shape or resolution failures for unmatched names, but annotations carry the safety profile so this is largely sufficient.

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 the baseline is 3, but the description genuinely adds a cross-field constraint not captured by the schema: that either payeeId or payeeName must be provided, and that subtransactions replace (not supplement) categoryId/categoryName. This goes beyond per-parameter schema text.

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 opens with a specific verb+resource ('Creates a new transaction in your YNAB plan'), making the operation unambiguous. It is implicitly distinguishable from ynab_update_transaction and ynab_delete_transaction by the verb, but never names or contrasts 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?

It gives clear conditional usage rules: account via accountId OR accountName, category via categoryId OR categoryName, payee required via payeeId OR payeeName, and subtransactions instead of a category when splitting. However, it offers no guidance on when to choose this over siblings like ynab_import_transactions or ynab_update_transaction.

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