Skip to main content
Glama
justmytwospence

ynab-mcp

get_month_money_movements

Retrieve monthly financial transactions and money movements from YNAB budgets to track income, expenses, and cash flow for specific periods.

Instructions

[1 API call] Get money movements 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) or 'current'

Implementation Reference

  • Implementation of the 'get_month_money_movements' tool handler.
    server.registerTool("get_month_money_movements", {
      title: "Get Month Money Movements",
      description: "[1 API call] Get money movements 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) or 'current'"),
      },
      annotations: { readOnlyHint: true },
    }, async ({ budget_id, month }) => {
      try {
        const response = await getMoneyMovementsClient().getMoneyMovementsByMonth(budget_id, month);
        const movements = response.data.money_movements;
        if (!movements || movements.length === 0) return textResult(`No money movements found for ${month}.`);
        const lines = movements.map((m) => {
          const from = m.from_category_id ?? "Ready to Assign";
          const to = m.to_category_id ?? "Ready to Assign";
          return `- ${formatCurrency(m.amount)}: ${from} -> ${to} ${m.note ? `(${m.note})` : ""}`;
        });
        return textResult(`Money Movements for ${month} (${movements.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