Skip to main content
Glama
justmytwospence

ynab-mcp

Bulk Update Transactions

update_transactions

Update multiple YNAB transactions in bulk by providing transaction IDs and new details like amounts, categories, or cleared status.

Instructions

[1 API call, bulk] Update multiple transactions at once. Each must include either id or import_id to identify the transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
transactionsYesTransactions to update

Implementation Reference

  • Registration of the "update_transactions" tool with input schema validation.
    server.registerTool("update_transactions", {
      title: "Bulk Update Transactions",
      description: "[1 API call, bulk] Update multiple transactions at once. Each must include either id or import_id to identify the transaction.",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        transactions: z.array(z.object({
          id: z.string().optional().describe("Transaction ID"),
          import_id: z.string().optional().describe("Import ID"),
          account_id: z.string().optional(),
          date: z.string().optional(),
          amount: z.number().optional().describe("Amount in dollars"),
          payee_id: z.string().optional(),
          payee_name: z.string().optional(),
          category_id: z.string().optional(),
          memo: z.string().optional(),
          cleared: z.enum(CLEARED_VALUES).optional(),
          approved: z.boolean().optional(),
          flag_color: z.enum(FLAG_COLORS).optional(),
        })).describe("Transactions to update"),
      },
      annotations: { readOnlyHint: false },
  • Handler logic for the "update_transactions" tool, performing a bulk update on YNAB transactions.
    }, async ({ budget_id, transactions }) => {
      try {
        const response = await getClient().transactions.updateTransactions(budget_id, {
          transactions: transactions.map((t) => ({
            ...t,
            amount: t.amount != null ? dollarsToMilliunits(t.amount) : undefined,
            flag_color: t.flag_color ?? null,
          })),
        });
        const updated = response.data.transactions;
        return textResult(`Updated ${updated?.length ?? 0} transaction(s).`);
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
Behavior3/5

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

Annotations already declare readOnlyHint=false, indicating this is a mutation tool. The description adds useful behavioral context about the bulk operation ('[1 API call, bulk]') and the identification requirement, but doesn't disclose other important traits like error handling, rate limits, or what happens when transactions fail. With annotations covering the mutation aspect, this earns a baseline score.

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?

Extremely concise with just two sentences that both earn their place. The first sentence establishes the bulk operation scope, the second provides critical identification requirements. No wasted words or redundant information.

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

Completeness3/5

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

For a mutation tool with no output schema and 100% schema coverage, the description provides adequate but minimal context. It covers the bulk nature and identification requirements, but lacks information about response format, error conditions, or transactional behavior. Given the complexity of updating multiple transactions, more behavioral context would be helpful.

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?

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds minimal value beyond the schema - it mentions the identification requirement (id or import_id) which is already in the schema, but doesn't provide additional semantic context about parameter usage or constraints. Baseline 3 is appropriate when schema does the heavy lifting.

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 specific action ('Update multiple transactions at once') and resource ('transactions'), distinguishing it from sibling tools like 'update_transaction' (singular) and 'create_transactions'. The bulk nature is explicitly mentioned, providing clear differentiation.

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 usage context through the bulk operation mention and identification requirement ('Each must include either id or import_id'), but doesn't explicitly state when to use this versus alternatives like 'update_transaction' (singular) or 'create_transactions'. No explicit when-not or alternative guidance is provided.

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