Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

update_waf_rule_tool

Update an existing Cloudflare WAF custom rule by modifying its filter expression, action, description, or enabled status. Specify rule ID and either zone ID or zone name.

Instructions

Update an existing WAF custom rule.

Provide either zone_id or zone_name, not both.

Args: rule_id: Rule ID (32-character hex string) zone_id: Zone ID (32-character hex string) zone_name: Zone name (domain like example.com) expression: New filter expression (optional) action: New action (optional) description: New description (optional) enabled: Enable or disable the rule (optional)

Returns: Updated rule details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNo
enabledNo
rule_idYes
zone_idNo
zone_nameNo
expressionNo
descriptionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / action / description
      Removed value: -"New action (optional)"
    • removedInput schema / properties / description / description
      Removed value: -"New description (optional)"
    • removedInput schema / properties / enabled / description
      Removed value: -"Enable or disable the rule (optional)"
    • removedInput schema / properties / expression / description
      Removed value: -"New filter expression (optional)"
    • removedInput schema / properties / rule_id / description
      Removed value: -"Rule ID (32-character hex string)"
    • removedInput schema / properties / zone_id / description
      Removed value: -"Zone ID (32-character hex string)"
    • removedInput schema / properties / zone_name / description
      Removed value: -"Zone name (domain like example.com)"
  2. First observedv0.5.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully clarifies that updates are partial (only supplied fields change), but says nothing about permission/auth requirements, reversibility of changes, or side effects on an active WAF rule. The output schema covers the return shape.

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

Conciseness4/5

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

The one-line purpose plus mutually exclusive constraint is front-loaded, followed by a clean Args list. No wasted prose, though the Args block largely restates the schema structure.

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?

With an output schema covering return values, the description only needs to cover invocation semantics, which it does for all parameters plus the zone constraint. It is missing only the permission/side-effect context an agent would want for a mutation tool with no annotations.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does: all seven parameters are enumerated, ID formats are given (32-character hex for rule_id/zone_id, domain form for zone_name), and the zone_id/zone_name mutual exclusion is stated. The action/expression/enabled params get only 'New X (optional)', so it is not fully complete.

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

Purpose4/5

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

States a specific verb and resource ('Update an existing WAF custom rule'), which cleanly separates it from siblings like create_waf_rule_tool, delete_waf_rule_tool, and list_waf_rules_tool. It stops short of explicitly naming those siblings, so it stays just below a 5.

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

Usage Guidelines3/5

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

The 'Provide either zone_id or zone_name, not both' line gives real usage guidance for parameter selection, and the '(optional)' tags imply partial-update intent. However, there is no guidance on when to prefer this tool over alternatives or any prerequisites, leaving usage only implied.

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