Skip to main content
Glama
calebl

YNAB MCP Server

by calebl

List Scheduled Transactions

ynab_list_scheduled_transactions

View all scheduled recurring transactions in your YNAB budget to track upcoming payments and manage cash flow.

Instructions

Lists all scheduled (recurring) transactions in a budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budgetIdNoThe ID of the budget (optional, defaults to YNAB_BUDGET_ID environment variable)

Implementation Reference

  • The execute function implementing the core logic: retrieves scheduled transactions from YNAB API, filters out deleted ones, formats the data, and returns it as JSON-formatted text content or error.
    export async function execute(input: ListScheduledTransactionsInput, api: ynab.API) {
      try {
        const budgetId = getBudgetId(input.budgetId);
    
        console.error(`Listing scheduled transactions for budget ${budgetId}`);
        const response = await api.scheduledTransactions.getScheduledTransactions(budgetId);
    
        // Filter and format scheduled transactions
        const scheduledTransactions = response.data.scheduled_transactions
          .filter((txn) => !txn.deleted)
          .map((txn) => ({
            id: txn.id,
            date_first: txn.date_first,
            date_next: txn.date_next,
            frequency: txn.frequency,
            amount: (txn.amount / 1000).toFixed(2),
            memo: txn.memo,
            flag_color: txn.flag_color,
            account_id: txn.account_id,
            account_name: txn.account_name,
            payee_id: txn.payee_id,
            payee_name: txn.payee_name,
            category_id: txn.category_id,
            category_name: txn.category_name,
            transfer_account_id: txn.transfer_account_id,
          }));
    
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify({
              scheduled_transactions: scheduledTransactions,
              count: scheduledTransactions.length,
            }, null, 2),
          }],
        };
      } catch (error) {
        console.error("Error listing scheduled transactions:", error);
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify({
              success: false,
              error: getErrorMessage(error),
            }, null, 2),
          }],
        };
      }
    }
  • Input schema definition using Zod for optional budgetId parameter.
    export const inputSchema = {
      budgetId: z.string().optional().describe("The ID of the budget (optional, defaults to YNAB_BUDGET_ID environment variable)"),
    };
  • src/index.ts:111-115 (registration)
    Registers the tool with the MCP server, providing name, title, description, inputSchema, and the async handler wrapping the execute function with the YNAB API instance.
    server.registerTool(ListScheduledTransactionsTool.name, {
      title: "List Scheduled Transactions",
      description: ListScheduledTransactionsTool.description,
      inputSchema: ListScheduledTransactionsTool.inputSchema,
    }, async (input) => ListScheduledTransactionsTool.execute(input, api));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists data, implying a read-only operation, but doesn't cover critical aspects like authentication needs, rate limits, pagination, error handling, or the format of returned data. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly communicates the action and scope, making it easy to parse quickly. Every part of the sentence earns its place by conveying essential information.

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?

Given the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what data is returned (e.g., transaction details, format), behavioral traits (e.g., read-only nature implied but not confirmed), or integration context. For a tool with no structured metadata, the description should compensate more to ensure the agent can invoke it correctly.

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?

The input schema has 100% description coverage, with the single parameter 'budgetId' clearly documented as optional with a default. The description doesn't add any parameter-specific details beyond what the schema provides, such as examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate.

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 ('Lists') and resource ('all scheduled (recurring) transactions in a budget'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'ynab_get_transactions' or 'ynab_get_unapproved_transactions', which might also involve transaction listing but with different filters or scopes.

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. It doesn't mention prerequisites (e.g., budget access), exclusions (e.g., non-recurring transactions), or compare it to sibling tools like 'ynab_get_transactions' that might handle similar data. This leaves the agent without context for tool selection.

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/calebl/ynab-mcp-server'

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