Skip to main content
Glama

ynab_update_category

Idempotent

Update the budgeted amount for a category in the current month using decimal currency or raw milliunits, with a dry-run preview before saving.

Instructions

Update the budgeted amount for a category in the current month.

Args:

  • budget_id (string, optional): Budget UUID. Omit to use the default budget.

  • category_id (string, required): Category UUID.

  • budgeted_decimal (number, preferred): New funding amount in decimal currency units.

  • budgeted_milliunits (int, alternative): Explicit raw YNAB milliunits.

  • dry_run (boolean, optional): Preview without saving. Default: false.

Returns: updated category with new budgeted, activity, balance.

Examples:

  • Budget $100: set budgeted_decimal=100.00

  • Already-converted data: set budgeted_milliunits=100000

  • Dry run: set dry_run=true

Errors:

  • "No default budget set" → run ynab_set_default_budget first

Write safety: call without confirmation_token to preview. The preview returns confirmation_token and confirmation_expires_at in its structured output (and in its text). Execute the identical validated request with that short-lived confirmation_token.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "category_id": "<category_id>"
    },
    "name": "ynab_update_category"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo
budget_idNo
category_idYes
budgeted_decimalNoPreferred: category funding amount in decimal currency units (for example, 100.00).
confirmation_tokenNoShort-lived, single-use token returned by the immediately preceding preview of this exact validated request. Omit, or pass null or an empty string, to preview.
budgeted_milliunitsNoRaw YNAB category funding amount in milliunits.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.33.0
    • removedInput schema / properties / budgeted
      Removed value: -{
      -  "description": "Deprecated legacy alias for budgeted_milliunits. Use budgeted_decimal or budgeted_milliunits.",
      -  "maximum": 9007199254740991,
      -  "minimum": -9007199254740991,
      -  "type": "integer"
      -}
  2. Changed1 schema field changedv0.32.0
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "ynab_update_category",
      -        "type": "string"
      -      },
      -      "dry_run": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "request": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "budget_id": {
      -            "type": "string"
      -          },
      -          "budgeted": {
      -            "type": "number"
      -          },
      -          "category_id": {
      -            "type": "string"
      -          },
      -          "month": {
      -            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "budget_id",
      -          "category_id",
      -          "budgeted",
      -          "month"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "dry_run",
      -      "action",
      -      "request"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "category": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "activity": {
      -            "description": "Activity in dollars",
      -            "type": "number"
      -          },
      -          "balance": {
      -            "description": "Balance in dollars",
      -            "type": "number"
      -          },
      -          "budgeted": {
      -            "description": "Budgeted amount in dollars",
      -            "type": "number"
      -          },
      -          "category_group_id": {
      -            "description": "Category group ID",
      -            "type": "string"
      -          },
      -          "category_group_name": {
      -            "description": "Category group name",
      -            "type": "string"
      -          },
      -          "deleted": {
      -            "description": "Deleted flag",
      -            "type": "boolean"
      -          },
      -          "goal_creation_month": {
      -            "description": "Goal creation month",
      -            "type": "string"
      -          },
      -          "goal_months_to_budget": {
      -            "description": "Goal months to budget",
      -            "type": "number"
      -          },
      -          "goal_overall_funded": {
      -            "description": "Goal overall funded amount in dollars",
      -            "type": "number"
      -          },
      -          "goal_overall_left": {
      -            "description": "Goal overall left amount in dollars",
      -            "type": "number"
      -          },
      -          "goal_percentage_complete": {
      -            "description": "Goal percentage complete",
      -            "type": "number"
      -          },
      -          "goal_target": {
      -            "description": "Goal target amount in dollars",
      -            "type": "number"
      -          },
      -          "goal_target_month": {
      -            "description": "Goal target month",
      -            "type": "string"
      -          },
      -          "goal_type": {
      -            "description": "Goal type",
      -            "type": "string"
      -          },
      -          "goal_under_funded": {
      -            "description": "Goal underfunded amount in dollars",
      -            "type": "number"
      -          },
      -          "hidden": {
      -            "description": "Hidden flag",
      -            "type": "boolean"
      -          },
      -          "id": {
      -            "description": "Category ID",
      -            "type": "string"
      -          },
      -          "name": {
      -            "description": "Category name",
      -            "type": "string"
      -          },
      -          "note": {
      -            "description": "Category note",
      -            "type": "string"
      -          },
      -          "original_category_group_id": {
      -            "description": "Original category group ID",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "category_group_id",
      -          "name",
      -          "hidden",
      -          "budgeted",
      -          "activity",
      -          "balance"
      -        ],
      -        "type": "object"
      -      },
      -      "updated_month": {
      -        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "category",
      -      "updated_month"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "ynab_update_category",
      +        "type": "string"
      +      },
      +      "confirmation_expires_at": {
      +        "description": "Preview only: when confirmation_token expires (ISO 8601).",
      +        "format": "date-time",
      +        "type": "string"
      +      },
      +      "confirmation_token": {
      +        "description": "Preview only: single-use token that executes this exact request when passed back as confirmation_token.",
      +        "type": "string"
      +      },
      +      "dry_run": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "request": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "budget_id": {
      +            "type": "string"
      +          },
      +          "budgeted": {
      +            "type": "number"
      +          },
      +          "category_id": {
      +            "type": "string"
      +          },
      +          "month": {
      +            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "budget_id",
      +          "category_id",
      +          "budgeted",
      +          "month"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "dry_run",
      +      "action",
      +      "request"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "category": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "activity": {
      +            "description": "Activity in dollars",
      +            "type": "number"
      +          },
      +          "balance": {
      +            "description": "Balance in dollars",
      +            "type": "number"
      +          },
      +          "budgeted": {
      +            "description": "Budgeted amount in dollars",
      +            "type": "number"
      +          },
      +          "category_group_id": {
      +            "description": "Category group ID",
      +            "type": "string"
      +          },
      +          "category_group_name": {
      +            "description": "Category group name",
      +            "type": "string"
      +          },
      +          "deleted": {
      +            "description": "Deleted flag",
      +            "type": "boolean"
      +          },
      +          "goal_creation_month": {
      +            "description": "Goal creation month",
      +            "type": "string"
      +          },
      +          "goal_months_to_budget": {
      +            "description": "Goal months to budget",
      +            "type": "number"
      +          },
      +          "goal_overall_funded": {
      +            "description": "Goal overall funded amount in dollars",
      +            "type": "number"
      +          },
      +          "goal_overall_left": {
      +            "description": "Goal overall left amount in dollars",
      +            "type": "number"
      +          },
      +          "goal_percentage_complete": {
      +            "description": "Goal percentage complete",
      +            "type": "number"
      +          },
      +          "goal_target": {
      +            "description": "Goal target amount in dollars",
      +            "type": "number"
      +          },
      +          "goal_target_month": {
      +            "description": "Goal target month",
      +            "type": "string"
      +          },
      +          "goal_type": {
      +            "description": "Goal type",
      +            "type": "string"
      +          },
      +          "goal_under_funded": {
      +            "description": "Goal underfunded amount in dollars",
      +            "type": "number"
      +          },
      +          "hidden": {
      +            "description": "Hidden flag",
      +            "type": "boolean"
      +          },
      +          "id": {
      +            "description": "Category ID",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Category name",
      +            "type": "string"
      +          },
      +          "note": {
      +            "description": "Category note",
      +            "type": "string"
      +          },
      +          "original_category_group_id": {
      +            "description": "Original category group ID",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "category_group_id",
      +          "name",
      +          "hidden",
      +          "budgeted",
      +          "activity",
      +          "balance"
      +        ],
      +        "type": "object"
      +      },
      +      "confirmation_expires_at": {
      +        "description": "Preview only: when confirmation_token expires (ISO 8601).",
      +        "format": "date-time",
      +        "type": "string"
      +      },
      +      "confirmation_token": {
      +        "description": "Preview only: single-use token that executes this exact request when passed back as confirmation_token.",
      +        "type": "string"
      +      },
      +      "updated_month": {
      +        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "category",
      +      "updated_month"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed4 schema fields changedv0.31.0
    • addedInput schema / properties / confirmation_token / anyOf
      Added value: +[
      +  {
      +    "minLength": 16,
      +    "type": "string"
      +  },
      +  {
      +    "const": ""
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / confirmation_token / description
      Previous value: -"Short-lived, single-use token returned by the immediately preceding preview of this exact validated request."New value: +"Short-lived, single-use token returned by the immediately preceding preview of this exact validated request. Omit, or pass null or an empty string, to preview."
    • removedInput schema / properties / confirmation_token / minLength
      Removed value: -16
    • removedInput schema / properties / confirmation_token / type
      Removed value: -"string"
  4. Changed5 schema fields changedv0.27.1
    • addedInput schema / properties / budgeted / description
      Added value: +"Deprecated legacy alias for budgeted_milliunits. Use budgeted_decimal or budgeted_milliunits."
    • addedInput schema / properties / budgeted_decimal
      Added value: +{
      +  "description": "Preferred: category funding amount in decimal currency units (for example, 100.00).",
      +  "type": "number"
      +}
    • addedInput schema / properties / budgeted_milliunits
      Added value: +{
      +  "description": "Raw YNAB category funding amount in milliunits.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / confirmation_token
      Added value: +{
      +  "description": "Short-lived, single-use token returned by the immediately preceding preview of this exact validated request.",
      +  "minLength": 16,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "category_id",
      -  "budgeted"
      -]New value: +[
      +  "category_id"
      +]
  5. Addedv0.26.9

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by documenting the two-step write-safety contract: calling without confirmation_token previews, the preview returns a short-lived single-use token, and the identical validated request must be replayed with it. It also documents mutation outcome (updated budgeted, activity, balance) and a specific error-to-remedy mapping, which annotations alone cannot convey.

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

Conciseness4/5

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

Front-loaded purpose sentence, then clearly labeled Args/Returns/Examples/Errors sections that scan well. Slight redundancy in restating the confirmation_token workflow in both the Args-adjacent prose and the closing safety note, but every block carries information an agent needs.

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

Completeness5/5

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

For a mutating, confirmation-gated tool with an output schema, this covers everything: required versus optional parameters, unit conventions, preview/execute flow, default-budget fallback, and error remediation. The return-shape mention is harmless even though the output schema already defines it.

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

Parameters4/5

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

With 50% schema coverage, the Args block compensates by explaining budget_id defaults to the default budget, dry_run defaults to false, category_id is required, and the preferred-versus-alternative relationship between decimal and milliunits. The concrete examples (100.00 vs 100000) add real meaning beyond the schema's type declarations.

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

Purpose5/5

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

States a specific verb and resource plus a scope qualifier: 'Update the budgeted amount for a category in the current month.' That distinguishes it immediately from read-side siblings like ynab_get_category and from transaction-update siblings such as ynab_update_transaction.

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

Usage Guidelines4/5

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

Gives concrete routing: use budgeted_decimal for normal currency input, budgeted_milliunits for already-converted data, dry_run for preview, and run ynab_set_default_budget when 'No default budget set' is returned. It stops short of stating explicit when-not-to-use conditions (e.g., past months, which likely need ynab_get_month or another tool).

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