upsert_rewrite_rule
Adds or updates a rewrite policy with ordered match groups, evaluated in sequence without short-circuiting. Requires rule metadata and group conditions/actions.
Instructions
Add or update a rewrite policy with ordered MatchGroups. To update, ensure the rule object has an 'id'.
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": {
"rule_json": "<rule_json>",
"groups_json": "<groups_json>"
},
"name": "upsert_rewrite_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_json | Yes | JSON string specifying Policy metadata. Example: {"name":"Mock API","enabled":true,"priority":100} | |
| groups_json | Yes | JSON string array of MatchGroup objects. Each group has group_key, order, conditions (AND) and actions. Multiple groups are evaluated in order without short-circuiting. |