Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

set_request_header_rules_tool

Set request header modification rules to replace all existing rules, using expressions, descriptions, and rewrite actions to control headers on matching requests.

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

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.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden — and it does disclose the critical destructive trait that all existing rules are replaced. It also sketches the per-rule structure (expression, description, action, action_parameters). It stops short of covering permissions, failure behavior, or reversibility.

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 action and its replace semantics, followed by structured rule anatomy. Some redundancy with the schema (and the 'Returns: Updated ruleset' line, given an output schema exists), but nothing seriously wasteful.

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 mutation tool with no annotations and an output schema present, the description supplies the destructive-replace warning and the rule object shape an agent needs. Remaining gaps (auth, error modes) are modest.

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: zone_id is documented as a 32-character hex string and the rules array is expanded into its four expected fields. This meaningfully exceeds the bare schema.

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?

The description gives a specific verb and resource ('Set request header modification rules') and adds a crucial scope qualifier ('replaces all existing rules'). It implicitly distinguishes itself from the response-header sibling, though it never names an alternative explicitly.

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?

Usage is only implied: the 'replaces all existing rules' note tells the agent this is the write/replace path versus list_request_header_rules_tool, but there is no explicit when-to-use, when-not, or prerequisite guidance. Adequate but with clear gaps.

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