retract_pattern
Retract multiple facts matching a pattern using wildcard variables. Specify predicate and ?-prefixed arguments to remove all matching facts in one call. Returns count and list of retracted facts. Irreversible action.
Instructions
Retract all facts matching a pattern in a single call. Use ?-prefixed variables as wildcards to retract multiple facts at once. Returns the count and list of retracted facts. Side effects: DESTRUCTIVE — removes multiple facts and cascades TMS retraction for each removed fact (irreversible). Auth: requires X-Tenant-ID header; FACT_WRITE permission when auth is enabled. Rate-limited per principal. Errors: VALIDATION_ERROR on bad args.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| predicate | Yes | The predicate pattern to match for retraction | |
| args | Yes | Arguments — use ?x as wildcards to match multiple facts | |
| scope | No | Optional scope filter |