Add standing rule
purch_add_ruleRemember something ahead of time ("the next five days are the Texas conference, book it to travel"): matching rows get a suggested category until someone reviews them. When the person tells you about spending before it shows up on a statement (a trip, an event, a project, "everything from this shop is office supplies"), record it as a standing rule. Turn relative dates into real ones from today ("the next five days" from 2026-10-05 is 2026-10-05 to 2026-10-09) and say them back. A rule needs a window, words the statement line will contain, or a vendor; the category is the person's word. A rule SUGGESTS: it never books a row. Rows it matches show the suggestion and stay unreviewed until the person confirms them, in review or with purch_accept_suggestions. Effects: rule recorded; matching unreviewed rows carry its suggestion.
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": {
"label": "<label>",
"category": "<category>"
},
"name": "purch_add_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day it applies, inclusive. ISO date, YYYY-MM-DD. | |
| from | No | First day it applies. ISO date, YYYY-MM-DD. | |
| label | Yes | The person's name for it: "Texas conference", "Q4 office move". | |
| match | No | Words the statement line contains, any case (UBER, MARRIOTT). Optional. | |
| reason | No | What the person said, in their words. | |
| status | No | What matching rows are suggested as. Defaults to purchase. | |
| vendor | No | Only rows already named to this vendor. Optional. | |
| category | Yes | The category matching rows are suggested as, in the person's words (travel, office supplies). | |
| currency | No | Only rows in this currency (ISO 4217). Optional. |