get_month_money_movement_groups
Retrieve categorized money movement groups for a specific month to analyze income, expenses, and transfers within YNAB budgets.
Instructions
[1 API call] Get money movement groups for a specific month
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | Budget ID or 'last-used' | last-used |
| month | Yes | Month in YYYY-MM-DD format (first of month) or 'current' |
Implementation Reference
- src/tools/money-movements.ts:75-95 (handler)The implementation of the get_month_money_movement_groups MCP tool handler.
server.registerTool("get_month_money_movement_groups", { title: "Get Month Money Movement Groups", description: "[1 API call] Get money movement groups 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().getMoneyMovementGroupsByMonth(budget_id, month); const groups = response.data.money_movement_groups; if (!groups || groups.length === 0) return textResult(`No money movement groups found for ${month}.`); const lines = groups.map((g) => `- ${g.note ?? "No note"} (Created: ${g.group_created_at}) [ID: ${g.id}]` ); return textResult(`Money Movement Groups for ${month} (${groups.length}):\n${lines.join("\n")}`); } catch (e: any) { return errorResult(e.message); } });