Skip to main content
Glama
duganth

py-ynab-mcp

by duganth

create_transaction

Create a YNAB transaction with amount, date, payee, category, memo, and optional split subtransactions. Supports dry-run validation before posting.

Instructions

Create a transaction in YNAB.

Args: account_id: Account UUID. amount: Dollar amount ("-42.50" for outflow, "100.00" for inflow). date: Transaction date (YYYY-MM-DD). payee_name: Payee name (YNAB auto-creates new payees). payee_id: Payee UUID, including an account transfer payee ID. category_id: Category UUID. Omit when splitting. memo: Transaction memo. cleared: "cleared", "uncleared", or "reconciled". approved: Whether the transaction is approved. subtransactions_json: JSON array of split legs, to record one card charge against several categories. Each element: {"amount", "category_id"?, "payee_name"?, "payee_id"?, "memo"?}. Amounts are dollars with the same sign as the parent (e.g. "-30.00") and must sum to it. Needs at least two legs, and category_id must be left off the parent. budget_id: Budget ID. Defaults to last-used budget. dry_run: Validate and preview without creating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes
memoNo
amountYes
clearedNo
dry_runNo
approvedNo
payee_idNo
budget_idNo
account_idYes
payee_nameNo
category_idNo
subtransactions_jsonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / payee_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Payee Id"
      +}
    • addedInput schema / properties / subtransactions_json
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {},
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Subtransactions Json"
      +}
  2. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Without annotations, the description carries the burden. It clearly indicates that normal execution creates a transaction and dry_run validates without creating, making the primary side effect explicit, though it doesn't mention downstream balance or budget effects.

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 a clean, alphabetically organized parameter list with concise inline explanations and useful examples; no superfluous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All 12 parameters are covered with enough detail to construct valid calls. Output schema exists, so return values need not be explained. No significant gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema properties have no descriptions, but the tool description fully compensates by explaining every parameter, including UUID roles, amount sign conventions, date format, payee auto-creation, split-transaction semantics, budget defaulting, and dry_run behavior.

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?

States the specific verb-resource pairing 'Create a transaction in YNAB' and is easily distinguished from siblings like create_transactions, create_scheduled_transaction, and update_transaction.

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

Usage Guidelines3/5

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

The description implies single-transaction creation and mentions dry_run for validation, but it does not explicitly contrast with create_transactions or other transaction-related tools.

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