Skip to main content
Glama
justmytwospence

ynab-mcp

list_month_transactions

Retrieve and filter transactions for a specific month from YNAB budgets to track spending, monitor categories, and review financial activity.

Instructions

[1 API call] List transactions for a specific month

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
monthYesMonth in YYYY-MM-DD format (first of month)
since_dateNoOnly return transactions on or after this date
typeNoFilter by type
last_knowledge_of_serverNoDelta request token

Implementation Reference

  • Registration of the list_month_transactions tool.
    server.registerTool("list_month_transactions", {
      title: "List Month Transactions",
      description: "[1 API call] List transactions for a specific month",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        month: z.string().describe("Month in YYYY-MM-DD format (first of month)"),
        since_date: z.string().optional().describe("Only return transactions on or after this date"),
        type: z.enum(TRANSACTION_TYPES).optional().describe("Filter by type"),
        last_knowledge_of_server: z.number().optional().describe("Delta request token"),
      },
      annotations: { readOnlyHint: true },
  • Handler implementation for the list_month_transactions tool.
    }, async ({ budget_id, month, since_date, type, last_knowledge_of_server }) => {
      try {
        const response = await getClient().transactions.getTransactionsByMonth(
          budget_id, month, since_date, type, last_knowledge_of_server
        );
        const txns = response.data.transactions;
        if (txns.length === 0) return textResult(`No transactions found for ${month}.`);
        const lines = txns.map(formatTransaction);
        return textResult(`Month Transactions for ${month} (${txns.length}):\n${lines.join("\n")}`);
      } catch (e: any) {
        return errorResult(e.message);
      }
    });

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