Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

Set Response Header Rules Tool

set_response_header_rules_tool

Replace all existing response header modification rules in a Cloudflare zone to rewrite response headers based on filter expressions.

Instructions

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

Each rule should have:

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

  • 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

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the tool replaces ALL existing rules (a destructive trait), which is meaningful. However, it omits permission/auth requirements and whether changes are reversible, leaving notable gaps for a mutation tool.

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?

Front-loads the core action and replace semantics, then lists rule fields compactly with bullets. No wasted sentences, though the header nesting example is slightly cryptic.

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 not be explained, and both parameters and rule structure are covered. The remaining gap is auth/permission context and the exact action_parameters shape, but the definition is otherwise complete for calling the tool.

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 coverage is 100% (baseline 3), but the description goes further by documenting the internal shape of each rule object (expression, description, action, action_parameters with headers). Since the schema only says 'List of rule definitions' with additionalProperties:true, this field-level detail adds real semantic value.

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?

States a specific verb ('Set') and resource ('response header modification rules'), and explicitly notes the replace semantics. An agent can distinguish it from set_request_header_rules_tool and list_response_header_rules_tool purely from the description.

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 '(replaces all existing rules)' note implies destructive use and gives a warning, but there is no explicit when-to-use guidance or routing to siblings such as list_response_header_rules_tool for reading before writing. Usage must be inferred.

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