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.
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": {
"predicate": "<predicate>",
"args": "<args>"
},
"name": "retract_pattern"
}
}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 |