Skip to main content
Glama
justmytwospence

ynab-mcp

Create Multiple Transactions

create_transactions

Add multiple financial records to YNAB budgets in bulk by specifying account, date, and amount for each transaction.

Instructions

[1 API call, bulk] Create multiple transactions at once. Each transaction needs account_id, date, and amount at minimum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
transactionsYesArray of transactions to create

Implementation Reference

  • The `create_transactions` tool is defined here, including its input schema and handler function which calls the underlying API to create multiple transactions.
    server.registerTool("create_transactions", {
      title: "Create Multiple Transactions",
      description: "[1 API call, bulk] Create multiple transactions at once. Each transaction needs account_id, date, and amount at minimum.",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        transactions: z.array(z.object({
          account_id: z.string().describe("Account ID"),
          date: z.string().describe("Date (YYYY-MM-DD)"),
          amount: z.number().describe("Amount in dollars (negative for outflows)"),
          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("Array of transactions to create"),
      },
      annotations: { readOnlyHint: false },
    }, async ({ budget_id, transactions }) => {
      try {
        const response = await getClient().transactions.createTransaction(budget_id, {
          transactions: transactions.map((t) => ({
            account_id: t.account_id,
            date: t.date,
            amount: dollarsToMilliunits(t.amount),
            payee_id: t.payee_id,
            payee_name: t.payee_name,
            category_id: t.category_id,
            memo: t.memo,
            cleared: t.cleared,
            approved: t.approved,
            flag_color: t.flag_color ?? null,
          })),
        });
        const created = response.data.transactions;
        return textResult(`Created ${created?.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?

The annotation (readOnlyHint: false) already indicates this is a write operation. The description adds useful context about it being a 'bulk' operation and '[1 API call]', which helps the agent understand efficiency implications. However, it doesn't disclose other behavioral traits like error handling for partial failures, rate limits, or authentication requirements beyond what annotations provide.

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 (two sentences) and front-loaded with the core purpose. Every word earns its place: the first sentence establishes the bulk operation and API efficiency, while the second clarifies minimum 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.

Completeness4/5

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

For a write operation with no output schema, the description adequately covers the core functionality and minimum requirements. However, it could better address the complexity of bulk operations by mentioning potential error scenarios or response format expectations. The 100% schema coverage helps compensate, but behavioral context for a mutation tool remains somewhat light.

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, the schema fully documents all parameters. The description adds minimal value by mentioning that 'Each transaction needs account_id, date, and amount at minimum,' which reinforces the required fields but doesn't provide additional semantic context beyond what's already in the schema's required array and property descriptions.

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 ('Create multiple transactions at once'), identifies the resource ('transactions'), and distinguishes it from the sibling 'create_transaction' tool through the explicit 'bulk' operation and 'multiple' qualifier.

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 for when to use this tool ('bulk' creation of multiple transactions) and implicitly suggests an alternative (the sibling 'create_transaction' for single transactions). However, it doesn't explicitly state when NOT to use it or compare it directly with other transaction-related tools like 'import_transactions'.

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