Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

set_response_header_rules_tool

Set response header modification rules for a Cloudflare zone, replacing existing rules with expression-based header rewrites.

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": {...}}}

Args: zone_id: Zone ID (32-character hex string) rules: List of rule definitions

Returns: Updated ruleset

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYes
zone_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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)"
  2. First observedv0.5.0

TDQS

A3.9/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 critical destructive trait that this call replaces ALL existing rules. It does not cover auth requirements, rate limits, or partial-failure semantics, but the disclosure of full overwrite is the most important behavioral fact here.

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-loaded with the verb and the destructive replace note; the rule-shape bullets are dense and useful. The 'Args:'/'Returns: Updated ruleset' scaffolding is mildly redundant given the output schema exists, but overall the text is 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?

For a two-parameter set tool with an output schema (so return values need not be described), the description covers the rule shape and the overwrite behavior adequately. It is only missing alternative-tool routing and auth prerequisites.

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 0%, so the description must compensate, and it does: it gives zone_id as a '32-character hex string' and enumerates the rule object fields (expression, description, action, action_parameters). The action_parameters shape is left as '{...}', which is the only gap.

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 the parenthetical '(replaces all existing rules)' clarifies the operation's semantics. The resource word 'response header' distinguishes it from the sibling set_request_header_rules_tool and from list_response_header_rules_tool.

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

Usage Guidelines2/5

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

The description offers no explicit guidance on when to use this tool versus alternatives such as list_response_header_rules_tool or set_request_header_rules_tool. The replacement note is a behavioral fact, not usage routing, so an agent gains no when-to-use direction.

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