rule_create
Create transaction categorization rules that route bank lines to an account when conditions like description, direction, amount, or counterparty match, with optional project and counterparty assignment.
Instructions
Create a categorization rule that fires when all of its conditions hold: contains (case-insensitive description substring), direction (inflow or outflow), amount_eq, amount_gt or amount_lt in major units, and counterparty. Give at least one. A counterparty condition uses the transaction's link, or else the counterparty's name as whole words of the description, without case or accents; a name with no word of three or more letters or digits matches only by link and returns warnings. When it fires it routes the line to account, and can link set_counterparty and attribute set_project; writing either action needs counterparty_associate and project_split access. Higher priority wins. Omitted priority defaults to zero.
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": {
"company": "<company>",
"account": "<account>"
},
"name": "rule_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account that receives each categorized line. | |
| company | Yes | ||
| contains | No | Condition: case-insensitive literal substring of the description. | |
| currency | No | Currency of the amount condition. Defaults to the book's currency. | |
| priority | No | The precedence of a rule. Higher values take precedence. | |
| amount_eq | No | Condition: exact line amount in major units. | |
| amount_gt | No | Condition: line amount greater than this, in major units. | |
| amount_lt | No | Condition: line amount less than this, in major units. | |
| direction | No | Condition: inflow when money arrived in the bank account, outflow when it left. | |
| set_project | No | Action: attribute each categorized line to this project. | |
| counterparty | No | Condition: the line is from or to this counterparty. A linked counterparty decides; otherwise the party's name must appear in the description. | |
| set_counterparty | No | Action: link each categorized transaction to this counterparty. |