Skip to main content
Glama
justmytwospence

ynab-mcp

Create Scheduled Transaction

create_scheduled_transaction

Create recurring transactions in YNAB for future dates, automating regular income or expense entries with customizable frequency and details.

Instructions

[1 API call] Create a new scheduled (recurring) transaction. Date must be in the future (up to 5 years).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
account_idYesAccount ID
dateYesFirst occurrence date (YYYY-MM-DD), must be future
amountYesAmount in dollars (negative for outflows)
frequencyYesHow often the transaction repeats
payee_idNoPayee ID
payee_nameNoPayee name
category_idNoCategory ID (cannot be credit card payment)
memoNoMemo
flag_colorNoFlag color

Implementation Reference

  • Registration of the "create_scheduled_transaction" tool, defining its metadata and input schema.
    server.registerTool("create_scheduled_transaction", {
      title: "Create Scheduled Transaction",
      description: "[1 API call] Create a new scheduled (recurring) transaction. Date must be in the future (up to 5 years).",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        account_id: z.string().describe("Account ID"),
        date: z.string().describe("First occurrence date (YYYY-MM-DD), must be future"),
        amount: z.number().describe("Amount in dollars (negative for outflows)"),
        frequency: z.enum(FREQUENCIES).describe("How often the transaction repeats"),
        payee_id: z.string().optional().describe("Payee ID"),
        payee_name: z.string().optional().describe("Payee name"),
        category_id: z.string().optional().describe("Category ID (cannot be credit card payment)"),
        memo: z.string().optional().describe("Memo"),
        flag_color: z.enum(FLAG_COLORS).optional().describe("Flag color"),
      },
      annotations: { readOnlyHint: false },
  • Handler implementation for "create_scheduled_transaction", which communicates with the YNAB client API to create the transaction.
    }, async ({ budget_id, account_id, date, amount, frequency, payee_id, payee_name, category_id, memo, flag_color }) => {
      try {
        const response = await getClient().scheduledTransactions.createScheduledTransaction(budget_id, {
          scheduled_transaction: {
            account_id,
            date,
            amount: dollarsToMilliunits(amount),
            frequency,
            payee_id,
            payee_name,
            category_id,
            memo,
            flag_color: flag_color ?? null,
          },
        });
        const t = response.data.scheduled_transaction;
        return textResult(
          `Created scheduled transaction: ${t.date_first} | ${formatCurrency(t.amount)} | ${t.payee_name ?? "No payee"} | ${t.frequency}\nID: ${t.id}`
        );
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
Behavior3/5

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

Annotations indicate readOnlyHint=false, confirming this is a write operation, which aligns with 'Create' in the description. The description adds useful context about the date constraint (future, up to 5 years) and mentions '[1 API call]', hinting at performance. However, it lacks details on permissions, error handling, or what happens on creation (e.g., returns an ID), leaving behavioral gaps.

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 short sentences with zero waste: the first sentence states the purpose and key constraint, and the second adds the date limit. It is front-loaded with essential information and appropriately sized for the tool's complexity.

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?

Given the tool's complexity (10 parameters, write operation) and lack of output schema, the description is somewhat incomplete. It covers the purpose and date constraints but misses details on return values, error cases, or dependencies (e.g., budget/account existence). With annotations providing only readOnlyHint, more behavioral context would improve completeness.

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 all 10 parameters. The description does not add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain parameter interactions or provide examples). This meets the baseline for high schema coverage.

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 verb ('Create') and resource ('new scheduled (recurring) transaction'), specifying it's for recurring transactions. It distinguishes from sibling 'create_transaction' by emphasizing the scheduled/recurring nature, making the purpose specific and differentiated.

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 (for future-dated recurring transactions) with the date constraint 'must be in the future (up to 5 years)'. However, it does not explicitly mention when not to use it or name alternatives like 'create_transaction' for one-time transactions, though the context is implied.

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