Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

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

TableJSON Schema
NameRequiredDescriptionDefault
actionNoAction to take (managed_challenge, block, js_challenge, challenge, skip, log)managed_challenge
enabledNoWhether the rule is enabled (default: true)
zone_idNoZone ID (32-character hex string)
zone_nameNoZone name (domain like example.com)
expressionNoCloudflare filter expression (e.g., '(http.request.uri.path contains "xmlrpc.php")')
descriptionNoHuman-readable description of the rule

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since there are no annotations, the description carries the burden of behavioral disclosure. It reveals the free plan limit, which is a behavioral constraint slash side effect. It does not mention that the tool likely requires authentication or permission, but that may be assumed from the context. It also doesn't state that the default action is managed_challenge. However, defaults are in the schema, so the description doesn't need to repeat them. Overall, it's reasonably transparent about the main constraint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: one purpose sentence and one constraint sentence. It avoids repeating schema details. It sets expectations about plan limits. The structure is clear and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential: what it does, a key constraint, and a hint about limits. It doesn't provide an example of usage, but the schema has examples for the expression. It might be enhanced by stating that it will return the created rule object, but that might be evident from the output schema. Overall, it's fairly complete for a create tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All parameters are clearly described in the schema with examples for the expression. The description text clarifies the zone_id/zone_name mutual exclusivity and provides a concrete example of a filter expression. Even though the schema does not mark any parameter as required, the description implies that either zone_id or zone_name is needed Some concern that the schema doesn't enforce this, but the description covers it. All parameters have descriptions, so 100% coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Create a new WAF custom rule' with a specific verb and resource, and the name reinforces the purpose. It distinguishes from sibling update/delete tools by the word 'create'. The note about free plan limits adds context without detracting from clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on the mutual exclusivity of zone_id and zone_name, which is critical for correct invocation. It also mentions the 5-rule limit for free plans, which helps set expectations. However, it does not explicitly state when not to use this tool (e.g., for updates) but the name 'create' implies that. It could be improved by stating the requirement to supply either zone_id or zone_name more formally.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/crunchtools/mcp-cloudflare'

If you have feedback or need assistance with the MCP directory API, please join our Discord server