cf_get_rule
Retrieve a specific Cloudflare rule by its ID from a ruleset to identify the rule behind a firewall event.
Instructions
Look up a single rule by ID.
Cloudflare exposes rule lookup via the parent ruleset; this is a
convenience wrapper that fetches the ruleset and projects the matching
rule. Used heavily for "what does rule X do" resolution when a firewall
event reports an unknown rule ID.
Args:
scope: 'zone' or 'account'.
scope_id: matching CF ID.
ruleset_id: parent ruleset ID.
rule_id: rule ID to extract.
Calls: GET /{zones|accounts}/{scope_id}/rulesets/{ruleset_id} → project rule.
Errors:
not_found when the ruleset returns 200 but no rule matches the 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": {
"scope": "<scope>",
"scope_id": "<scope_id>",
"ruleset_id": "<ruleset_id>",
"rule_id": "<rule_id>"
},
"name": "cf_get_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| scope_id | Yes | ||
| ruleset_id | Yes | ||
| rule_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |