Delete or Disable Custom Rule
delete_ruleDelete a deployed custom evaluation rule or disable/re-enable it without removal, controlling whether it fires on the next evaluate_output call.
Instructions
Remove a deployed custom rule — or, with enabled, disable or re-enable it without removing it — effective on the next evaluate_output call.
What it does. Without enabled: deletes the rule and writes an audit entry; deleted is false when no rule has that id. With enabled: false stops it firing and keeps it stored, true re-enables it. Past evaluations are untouched. Full detail: iris://capabilities.
When not to use it. On built-in rules (they are not in the store). To replace a rule (deploy_rule with replace: true).
Returns. JSON: deleted, rule_id, toggled, enabled, rule.
Errors. IRIS_STORAGE_ERROR. A malformed rule_id is refused. Failures return {"error":{code,message,recovery}} with isError; follow recovery.
Siblings. deploy_rule — add or replace a rule; list_rules — find the id; evaluate_output — where the rule fires.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No | When present the rule is kept: false disables it (stops firing), true re-enables it. Omit to delete | |
| rule_id | Yes | Rule id to delete or toggle (format: rule-<hex>); obtained from list_rules or deploy_rule response |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | No | ||
| deleted | Yes | ||
| enabled | No | ||
| rule_id | Yes | ||
| toggled | No |