Skip to main content
Glama
actual-mcp-server

actual-mcp-server

Manage rules

manage_rules
Destructive

Create, update, upsert or delete Actual Budget rules, including batch creation, to automate transaction payee, category, amount and date handling.

Instructions

Create, upsert, change or delete budget rules; pick one action. Writes. To read rules use list_entities with type rule. Other fields are refused. Conditions match by field and op: imported_payee, payee_name take is, isNot, contains, matches, doesNotContain, and oneOf, notOneOf with an array of text; notes takes is, isNot, contains, matches, doesNotContain; id fields (payee, account, category, category_group) take is, isNot, and oneOf, notOneOf with an array of ids; account also onBudget, offBudget (value ""); cleared, reconciled take is with true or false; amount takes is, isapprox, isbetween ({num1, num2} cents), gt, gte, lt, lte; date takes is, isapprox, gt, gte, lt, lte. notes and payee_name also take hasTags (all) and hasAnyTag (any): value "#a #b", whole tags, any case. Other condition fields are refused. Ids must exist or the call is refused and nothing is written (ids in link-schedule actions and category_group conditions are not checked). create: conditions, actions; optional stage, conditions_op. create_batch: rules (1 to 50, items with camelCase keys); NOT atomic, no rollback: a failing rule is reported in failed and the rest are still attempted; if the call itself fails, read the rules back before retrying. upsert: conditions, actions; optional stage, conditions_op; a rule with the same conditions and conditions_op (any order) has its actions replaced and its stage replaced only if sent, else a rule is created. update: id and at least one of stage, conditions_op, conditions, actions; unsent fields stay. delete: id; DESTRUCTIVE, cannot be undone; a rule owned by a schedule is refused (use manage_schedules delete); an unknown id is refused. Returns { id, success } (create), { result: { succeeded, failed, total, successCount, failureCount } } (create_batch), { id, created } (upsert), { success: true } (update, delete).

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": {
      "action": "<action>"
    },
    "name": "manage_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoRule id.
rulesNo1 to 50 rules, each {stage?, conditionsOp?, conditions, actions} with camelCase keys.
stageNonull or omitted: normal stage. "pre" runs before the normal stage, "post" after. On update, omit to keep the current stage.
actionYes
actionsNoItems {op, field, value[, type, options]}; op defaults to set on create and upsert, required on update.
conditionsNoItems {field, op, value[, type, options]}; options {outflow|inflow} on amount; value: text, number, true or false, array (oneOf, notOneOf) or {num1, num2} (isbetween).
conditions_opNoHow conditions combine; default and.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.36.1
    • changedInput schema / properties / conditions / description
      Previous value: -"Items {field, op, value[, type]}; value is text, a number, true or false, an array (oneOf, notOneOf) or {num1, num2} (isbetween)."New value: +"Items {field, op, value[, type, options]}; options {outflow|inflow} on amount; value: text, number, true or false, array (oneOf, notOneOf) or {num1, num2} (isbetween)."
  2. Changed1 schema field changedv0.34.0
    • changedInput schema / properties / conditions / description
      Previous value: -"Items {field, op, value[, type]}; value is a string or number."New value: +"Items {field, op, value[, type]}; value is text, a number, true or false, an array (oneOf, notOneOf) or {num1, num2} (isbetween)."
  3. Addedv0.30.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and idempotentHint=false; the description goes far beyond that by disclosing that create_batch is NOT atomic with no rollback, the exact failure-reporting fields, the retry advice (read rules back before retrying), and that delete cannot be undone and is refused for schedule-owned rules. It is consistent with the destructive annotation rather than contradicting it.

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?

Purpose and the action list are front-loaded, and the per-action contract lines at the end are compact and scannable. The middle block of condition/operator rules is a dense semi-colon-separated wall that is hard to parse, but the information is load-bearing rather than padding.

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 five-mode, seven-parameter mutation tool with no output schema, the description supplies the return shapes for every action ({id, success}, the create_batch result counters, {id, created}, {success: true}), plus the failure and refusal semantics. Nothing material is left for the agent to guess before invoking it.

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

Parameters5/5

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

Schema coverage is already 86%, but the description adds substantial meaning the schema cannot express: which operators each condition field accepts, that oneOf/notOneOf take an array, that isbetween takes {num1, num2} in cents, and that hasTags requires whole tags in any case. It also disambiguates per-action requirements (update needs at least one mutable field, upsert replaces actions by matching conditions in any order, unsent fields stay).

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?

Opens with a precise verb set and resource: "Create, upsert, change or delete budget rules; pick one `action`." It immediately names the sibling used for the read path ("To read rules use list_entities with type rule"), so an agent can separate this mutation tool from the listing tool without opening either schema.

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

Usage Guidelines5/5

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

Explicit routing rules are given: reading goes to list_entities with type rule, and deleting a schedule-owned rule must go through manage_schedules delete instead. It also states the refusal conditions that would otherwise cause blind retries (unknown id refused, ids must exist, other fields refused), which is exactly the when-to-use / when-not-to-use guidance an agent needs.

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