cf_validate_wirefilter
Validate Cloudflare Wirefilter expressions with a syntactic check for balanced parentheses, unknown operators, and typos. Reports validity and errors.
Instructions
Best-effort syntactic check of a Cloudflare Wirefilter (Rules language) expression.
NOT a full grammar — catches balanced-paren violations, unknown operator
spellings, and obvious typos. A `{valid: true}` response does NOT
guarantee Cloudflare's evaluator will accept the expression at runtime.
Args:
expression: the wirefilter source, e.g. `(http.request.uri.path
contains "/admin" and ip.src in {1.2.3.4 5.6.7.8})`.
Returns: envelope with `data = {valid: bool, errors: list, expression}`.
Note: this tool returns success-envelope even when `valid=false`;
the validator's purpose IS to report syntactic issues.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |