Skip to main content
Glama
justmytwospence

ynab-mcp

update_category

Modify an existing budget category's name, note, or goal details in YNAB to reflect changes in financial planning or organization.

Instructions

[1 API call] Update an existing category's name, note, or goal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
category_idYesThe category ID to update
nameNoNew category name
noteNoNew category note
goal_targetNoNew goal target in dollars
goal_target_dateNoNew goal target date (YYYY-MM-DD)

Implementation Reference

  • The registration and handler implementation for the update_category tool.
    server.registerTool("update_category", {
      title: "Update Category",
      description: "[1 API call] Update an existing category's name, note, or goal",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        category_id: z.string().describe("The category ID to update"),
        name: z.string().optional().describe("New category name"),
        note: z.string().optional().describe("New category note"),
        goal_target: z.number().optional().describe("New goal target in dollars"),
        goal_target_date: z.string().optional().describe("New goal target date (YYYY-MM-DD)"),
      },
      annotations: { readOnlyHint: false },
    }, async ({ budget_id, category_id, name, note, goal_target, goal_target_date }) => {
      try {
        const response = await getClient().categories.updateCategory(budget_id, category_id, {
          category: {
            name,
            note,
            goal_target: goal_target != null ? dollarsToMilliunits(goal_target) : undefined,
            goal_target_date,
          },
        });
        const c = response.data.category;
        return textResult(`Updated category "${c.name}"\nID: ${c.id}`);
      } 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