Skip to main content
Glama
justmytwospence

ynab-mcp

Update Transaction

update_transaction

Modify existing YNAB transaction details like amount, date, payee, category, or status to correct errors or reflect changes in your budget.

Instructions

[1 API call] Update an existing transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
transaction_idYesThe transaction ID to update
account_idNoNew account ID
dateNoNew date (YYYY-MM-DD)
amountNoNew amount in dollars
payee_idNoNew payee ID
payee_nameNoNew payee name
category_idNoNew category ID
memoNoNew memo
clearedNoNew cleared status
approvedNoNew approval status
flag_colorNoNew flag color

Implementation Reference

  • Registration and implementation of the 'update_transaction' MCP tool.
    server.registerTool("update_transaction", {
      title: "Update Transaction",
      description: "[1 API call] Update an existing transaction",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        transaction_id: z.string().describe("The transaction ID to update"),
        account_id: z.string().optional().describe("New account ID"),
        date: z.string().optional().describe("New date (YYYY-MM-DD)"),
        amount: z.number().optional().describe("New amount in dollars"),
        payee_id: z.string().optional().describe("New payee ID"),
        payee_name: z.string().optional().describe("New payee name"),
        category_id: z.string().optional().describe("New category ID"),
        memo: z.string().optional().describe("New memo"),
        cleared: z.enum(CLEARED_VALUES).optional().describe("New cleared status"),
        approved: z.boolean().optional().describe("New approval status"),
        flag_color: z.enum(FLAG_COLORS).optional().describe("New flag color"),
      },
      annotations: { readOnlyHint: false },
    }, async ({ budget_id, transaction_id, ...fields }) => {
      try {
        const data: any = { ...fields };
        if (data.amount != null) data.amount = dollarsToMilliunits(data.amount);
        if (data.flag_color !== undefined) data.flag_color = data.flag_color ?? null;
        const response = await getClient().transactions.updateTransaction(budget_id, transaction_id, {
          transaction: data,
        });
        const t = response.data.transaction;
        return textResult(
          `Updated transaction: ${t.date} | ${formatCurrency(t.amount)} | ${t.payee_name ?? "No payee"}\nID: ${t.id}`
        );
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
Behavior2/5

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

The annotation readOnlyHint=false correctly indicates this is a mutation tool, but the description adds minimal behavioral context. It mentions '[1 API call]' which hints at performance/rate limit considerations, but doesn't disclose important behavioral traits like whether updates are atomic, what happens with partial updates, if there are validation rules, or what permissions are required. With annotations covering only the read/write aspect, the description carries significant burden for a mutation tool.

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 extremely concise with just two phrases: '[1 API call]' and 'Update an existing transaction'. Both phrases earn their place - the first provides API cost context, the second states the core purpose. There's zero wasted language or redundancy.

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

Completeness2/5

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

For a mutation tool with 12 parameters, no output schema, and minimal annotations, the description is inadequate. It doesn't explain what happens on success/failure, what values are returned, how errors are handled, or provide any examples of typical use cases. The '[1 API call]' hint is useful but doesn't compensate for the lack of behavioral context needed for a complex update operation.

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

Parameters3/5

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

With 100% schema description coverage, all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond the generic 'update' concept. It doesn't explain parameter relationships, constraints, or provide examples of typical update patterns. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 clearly states the verb ('Update') and resource ('an existing transaction'), making the purpose immediately understandable. It distinguishes from sibling tools like 'create_transaction' and 'delete_transaction' by specifying it's for existing transactions. However, it doesn't specify what fields can be updated beyond the generic 'update' term.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'update_transactions' (plural) or 'get_transaction' for viewing. It doesn't mention prerequisites like needing a valid transaction_id or budget context, nor does it explain when this tool is appropriate versus other update tools in the sibling list.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/justmytwospence/ynab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server