Manage rules
manage_rulesCreate, 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Rule id. | |
| rules | No | 1 to 50 rules, each {stage?, conditionsOp?, conditions, actions} with camelCase keys. | |
| stage | No | null or omitted: normal stage. "pre" runs before the normal stage, "post" after. On update, omit to keep the current stage. | |
| action | Yes | ||
| actions | No | Items {op, field, value[, type, options]}; op defaults to set on create and upsert, required on update. | |
| conditions | No | Items {field, op, value[, type, options]}; options {outflow|inflow} on amount; value: text, number, true or false, array (oneOf, notOneOf) or {num1, num2} (isbetween). | |
| conditions_op | No | How conditions combine; default and. |