Skip to main content
Glama
calebl

YNAB MCP Server

by calebl

Create Transaction

ynab_create_transaction

Create a new transaction in your YNAB budget by specifying date, amount, and optional account, category, payee, or memo. Streamlines logging expenses or income directly into your plan.

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.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. Addedv1.0.0

TDQS

A4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false (mutation), destructiveHint=false, and openWorldHint=true (fuzzy matching). The description's mention of 'fuzzy-matched' is redundant with openWorldHint. It does not add new behavioral context such as side effects (e.g., payee auto-creation is noted only in schema) or operational requirements. Since the bar is lower with annotations present, but the description contributes minimal additional behavioral insight, a score of 2 reflects the low added value beyond already available structured data.

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 description is two sentences with no redundant words. It front-loads the primary action and then immediately covers the key parameter alternatives and the mandatory payee condition. Every sentence adds critical guidance, and there is zero fluff or repetition of schema details.

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?

With 14 parameters and a thorough schema (100% coverage), the description does not need to enumerate each parameter. It covers the essential decision points: account/category/payee alternatives, the mandatory payee requirement, and the fuzzy matching behavior. The singular 'a new transaction' implies single-record creation, distinguishing it from bulk import. No output schema exists, so return values are not required. The description is complete for the core usage, though it omits edge cases like resolution of ambiguous fuzzy matches.

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. The description adds meaningful value by clarifying the alternative ways to specify account (accountId/accountName) and category (categoryId/categoryName), and by declaring that payeeId or payeeName must be provided – a requirement not present in the schema's required list. This helps the agent understand the mutually exclusive parameter groups and the hidden mandatory field, pushing the score above baseline.

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 action ('Creates a new transaction') and the resource ('your YNAB plan'), making the tool's purpose unambiguous. It also highlights the flexibility of using IDs or names for account/category, which distinguishes it from bulk import or update tools. The verb and resource are specific enough to differentiate from siblings like ynab_import_transactions or ynab_update_transaction without needing to inspect schemas.

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 provides clear context on how to specify account, category, and payee (via ID or name), and explicitly states that either payeeId or payeeName must be provided – a critical usage constraint not enforced by the schema. However, it does not explicitly contrast with ynab_import_transactions for bulk creation or mention when to avoid using this tool. The guidance is clear for the primary use case but lacks explicit exclusions.

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