update_month_category
Allocate money to YNAB budget categories by updating assigned amounts for specific months. Modify category budgets to match financial plans.
Instructions
[1 API call] Update the budgeted/assigned amount for a category in a specific month. This is how you allocate money to categories.
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' | |
| category_id | Yes | The category ID | |
| budgeted | Yes | Amount to budget/assign in dollars (e.g., 500.00) |
Implementation Reference
- src/tools/categories.ts:155-175 (handler)Registration and handler implementation of the 'update_month_category' tool.
server.registerTool("update_month_category", { title: "Update Month Category Budget", description: "[1 API call] Update the budgeted/assigned amount for a category in a specific month. This is how you allocate money to categories.", 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'"), category_id: z.string().describe("The category ID"), budgeted: z.number().describe("Amount to budget/assign in dollars (e.g., 500.00)"), }, annotations: { readOnlyHint: false }, }, async ({ budget_id, month, category_id, budgeted }) => { try { const response = await getClient().categories.updateMonthCategory(budget_id, month, category_id, { category: { budgeted: dollarsToMilliunits(budgeted) }, }); const c = response.data.category; return textResult(`Updated "${c.name}" for ${month}: Budgeted ${formatCurrency(c.budgeted)}`); } catch (e: any) { return errorResult(e.message); } });