Skip to main content
Glama
justmytwospence

ynab-mcp

create_category_group

Create a new category group in a YNAB budget to organize spending categories for better financial management.

Instructions

[1 API call] Create a new category group in a budget

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
nameYesCategory group name (max 50 characters)

Implementation Reference

  • Registration and handler implementation for the create_category_group tool.
    server.registerTool("create_category_group", {
      title: "Create Category Group",
      description: "[1 API call] Create a new category group in a budget",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        name: z.string().max(50).describe("Category group name (max 50 characters)"),
      },
      annotations: { readOnlyHint: false },
    }, async ({ budget_id, name }) => {
      try {
        const response = await getClient().categories.createCategoryGroup(budget_id, {
          category_group: { name },
        });
        const g = response.data.category_group;
        return textResult(`Created category group "${g.name}"\nID: ${g.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