create_waf_rule_tool
Create a Cloudflare WAF custom rule by specifying a zone, filter expression, and action—such as blocking or challenging—to enforce security policies directly.
Instructions
Create a new WAF custom rule.
Free plans support up to 5 custom rules. Provide either zone_id or zone_name, not both.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action to take (managed_challenge, block, js_challenge, challenge, skip, log) | managed_challenge |
| enabled | No | Whether the rule is enabled (default: true) | |
| zone_id | No | Zone ID (32-character hex string) | |
| zone_name | No | Zone name (domain like example.com) | |
| expression | No | Cloudflare filter expression (e.g., '(http.request.uri.path contains "xmlrpc.php")') | |
| description | No | Human-readable description of the rule |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||