ControlRules
Rules with an agent
Create allow and deny rules on a proxy or a credential.
Rules use the shared predicate shapes. Every matching rule is considered; any matching deny wins. If none matches, the parent record's default effect applies.
Call get_guide with guide_key: "rule-creation" before the first create.
Call order
- Call
create_proxy_rule.- Required:
clientId,proxyId,effect,ruleActive. - Optional:
priority,methods,path,headers,query,body,token,variables,notes,alerts.
- Required:
- Keep the returned rule
sKey. - Use
get_proxy_rule(clientId, proxyId, ruleId)to verify it.
list_proxy_rules requires clientId and proxyId. update_proxy_rule also requires ruleId; omit a field to keep it or send null to clear nullable fields. The equivalent credential tools are list_credential_rules, get_credential_rule, create_credential_rule, and update_credential_rule.
Example
{
"tool": "create_proxy_rule",
"arguments": {
"clientId": "b3a1c7d2-5e44-4f0a-9c1e-7d2f8a6b1c90",
"proxyId": "5d8a1c30-4e72-4b19-8f6a-0c3d9e7b1a25",
"effect": "deny",
"ruleActive": true,
"methods": ["DELETE"],
"path": {
"path": { "pattern": "^/v1/" },
"presence": "must_exist"
},
"priority": 100
}
}The result contains an active deny rule. Matching DELETE calls stop before reaching the target.