Skip to main content
Glama
justmytwospence

ynab-mcp

Create Category

create_category

Add a new budget category with name, group, goal targets, and notes to organize your finances in YNAB.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
nameYesCategory name
category_group_idYesID of the category group to add this category to
noteNoCategory note
goal_targetNoGoal target amount in dollars
goal_target_dateNoGoal target date (YYYY-MM-DD)

Implementation Reference

  • The "create_category" tool definition and handler implementation.
    server.registerTool("create_category", {
      title: "Create Category",
      description: "[1 API call] Create a new category in a budget",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        name: z.string().describe("Category name"),
        category_group_id: z.string().describe("ID of the category group to add this category to"),
        note: z.string().optional().describe("Category note"),
        goal_target: z.number().optional().describe("Goal target amount in dollars"),
        goal_target_date: z.string().optional().describe("Goal target date (YYYY-MM-DD)"),
      },
      annotations: { readOnlyHint: false },
    }, async ({ budget_id, name, category_group_id, note, goal_target, goal_target_date }) => {
      try {
        const response = await getClient().categories.createCategory(budget_id, {
          category: {
            name,
            category_group_id,
            note,
            goal_target: goal_target != null ? dollarsToMilliunits(goal_target) : undefined,
            goal_target_date,
          },
        });
        const c = response.data.category;
        return textResult(`Created category "${c.name}"\nID: ${c.id}`);
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotation 'readOnlyHint: false' correctly indicates this is a write operation, which aligns with the 'Create' action in the description. The description adds minimal behavioral context by specifying '[1 API call]', which hints at performance characteristics, but doesn't elaborate on permissions, side effects, or error conditions that would be valuable for a creation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—just one sentence plus an API call notation—with zero wasted words. It's front-loaded with the core purpose, making it easy for an agent to parse quickly and efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no output schema and minimal annotations, the description is adequate but lacks depth. It covers the basic purpose and hints at API usage, but doesn't address what happens after creation (e.g., response format, error handling, or how it integrates with sibling tools like 'list_categories'), leaving gaps in contextual understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, all parameters are well-documented in the input schema itself. The description doesn't add any additional semantic context about the parameters beyond what's already in the schema, so it meets the baseline expectation without enhancing understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create a new category') and resource ('in a budget'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this from sibling tools like 'create_category_group' or 'update_category', which would be needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'create_category_group' or 'update_category'. It also doesn't mention prerequisites or constraints beyond what's implied by the parameters, leaving the agent without contextual usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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