Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

Set Request Header Rules Tool

set_request_header_rules_tool

Replace all existing request header modification rules for a Cloudflare zone, defining filter expressions and header rewrites in a single call.

Instructions

Set request header modification rules (replaces all existing rules).

Each rule should have:

  • expression: Filter expression (e.g., "true" for all requests)

  • description: Human-readable description

  • action: "rewrite"

  • action_parameters: {"headers": {"Header-Name": {...}}}

Input Schema

NameRequiredDescriptionDefault
rulesYesList of rule definitions
zone_idYesZone ID (32-character hex string)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / rules / description
      Added value: +"List of rule definitions"
    • addedInput schema / properties / zone_id / description
      Added value: +"Zone ID (32-character hex string)"
  2. Changed3 schema fields changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / rules / description
      Removed value: -"List of rule definitions"
    • removedInput schema / properties / zone_id / description
      Removed value: -"Zone ID (32-character hex string)"
  3. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it discloses the single most important trait: this operation replaces ALL existing rules (destructive overwrite). It does not, however, mention auth/permission requirements or whether the call is idempotent.

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?

Front-loads the operation and its destructive caveat in one sentence, then uses a tight bullet list for the rule structure. Every element earns its place with no filler.

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?

An output schema exists so return values need no explanation, and the description covers the destructive replace behavior and rule sub-structure. It stops short of describing permissions or how to inspect existing rules before overwriting them.

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?

The rules items are untyped objects (additionalProperties: true) with no defined properties, so the description adds real meaning by spelling out each rule's fields (expression, description, action, action_parameters) and giving an example. zone_id is covered by the schema. This goes beyond the nominal 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?

Specific verb ('Set') plus resource ('request header modification rules'), and it explicitly notes the scope ('replaces all existing rules'). This cleanly distinguishes it from list_request_header_rules_tool (a read) and set_response_header_rules_tool (a different resource).

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 replace semantics imply a full-overwrite use case, but there is no explicit when-to-use guidance, no routing to siblings (e.g., list existing rules first, or use set_response_header_rules_tool for response headers). Usage is only implied.

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