Skip to main content
Glama
justmytwospence

ynab-mcp

get_scheduled_transaction

Retrieve details for a specific scheduled transaction in YNAB to view upcoming payments, amounts, and categories for better budget planning.

Instructions

[1 API call] Get details for a single scheduled transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
scheduled_transaction_idYesThe scheduled transaction ID

Implementation Reference

  • The handler function that executes the "get_scheduled_transaction" tool logic.
    }, async ({ budget_id, scheduled_transaction_id }) => {
      try {
        const response = await getClient().scheduledTransactions.getScheduledTransactionById(
          budget_id, scheduled_transaction_id
        );
        const t = response.data.scheduled_transaction;
        const lines = [
          `Date (First): ${t.date_first}`,
          `Date (Next): ${t.date_next}`,
          `Amount: ${formatCurrency(t.amount)}`,
          `Frequency: ${t.frequency}`,
          `Payee: ${t.payee_name ?? "None"} (ID: ${t.payee_id ?? "N/A"})`,
          `Category: ${t.category_name ?? "Uncategorized"} (ID: ${t.category_id ?? "N/A"})`,
          `Account: ${t.account_name} (ID: ${t.account_id})`,
          `Memo: ${t.memo ?? "None"}`,
          `Flag: ${t.flag_color ?? "None"}`,
          `ID: ${t.id}`,
        ];
        if (t.subtransactions && t.subtransactions.length > 0) {
          lines.push(`\nSplit Transactions:`);
          for (const sub of t.subtransactions) {
            lines.push(`  - ${formatCurrency(sub.amount)} | ${sub.category_name ?? "Uncategorized"} | ${sub.memo ?? ""}`);
          }
        }
        return textResult(lines.join("\n"));
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
  • The input schema definition for the "get_scheduled_transaction" tool.
    inputSchema: {
      budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
      scheduled_transaction_id: z.string().describe("The scheduled transaction ID"),
    },
    annotations: { readOnlyHint: true },
  • Registration of the "get_scheduled_transaction" tool within the MCP server.
    server.registerTool("get_scheduled_transaction", {

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