update_category_group
Modify the name of a budget category group in YNAB to reflect organizational changes or corrections.
Instructions
[1 API call] Update a category group's name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | Budget ID or 'last-used' | last-used |
| category_group_id | Yes | The category group ID | |
| name | Yes | New name (max 50 characters) |
Implementation Reference
- src/tools/categories.ts:197-215 (handler)Registration and implementation handler for the update_category_group MCP tool.
server.registerTool("update_category_group", { title: "Update Category Group", description: "[1 API call] Update a category group's name", inputSchema: { budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"), category_group_id: z.string().describe("The category group ID"), name: z.string().max(50).describe("New name (max 50 characters)"), }, annotations: { readOnlyHint: false }, }, async ({ budget_id, category_group_id, name }) => { try { const response = await getClient().categories.updateCategoryGroup(budget_id, category_group_id, { category_group: { name }, }); const g = response.data.category_group; return textResult(`Updated category group "${g.name}"\nID: ${g.id}`); } catch (e: any) { return errorResult(e.message); }