Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

set_request_header_rules_tool

Replace existing Cloudflare request header rules with custom rewrite rules. Define expressions and header modifications for a zone.

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

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 of behavioral disclosure. It clearly states 'replaces all existing rules' – a destructive, non-reversible action if unintended. It also constrains action to 'rewrite', adding operational detail. However, it doesn't mention permission requirements, failure modes, or whether the replacement is atomic. Still, it addresses the most critical behavioral aspect.

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?

The description is compact: two sentences plus a clear bullet list. It front-loads the purpose and key side effect, then uses bullets to enumerate the rule fields. No wasted words or redundancy; each element adds value.

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?

Given the output schema exists (not shown in description), there's no need to explain return values. The description adequately covers the input structure for both parameters: zone_id is self-evident from schema, and rules are detailed. It lacks mention of validation rules, error handling, or prerequisites like zone existence, but for a setter tool with a well-structured input, it is reasonably complete.

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

Parameters5/5

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

The schema's description for 'rules' is only 'List of rule definitions', which is minimal. The description adds substantial meaning by specifying each rule must contain 'expression', 'description', 'action', and 'action_parameters' with an example format. It also clarifies the expected structure of the headers rewrite. This is high-value information beyond the schema.

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?

Description clearly states the action ('Set request header modification rules'), specifies the resource (request headers), and the critical side effect ('replaces all existing rules'). It distinguishes from sibling set tools like set_response_header_rules_tool by explicitly focusing on request headers.

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 description mentions that it replaces all existing rules, which is a key usage caution, but it does not explicitly state when to use this tool versus alternatives like set_response_header_rules_tool or set_url_rewrite_rules_tool. The differentiation is implicit via the name and the 'request header' wording, but lacks explicit when-not guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/crunchtools/mcp-cloudflare'

If you have feedback or need assistance with the MCP directory API, please join our Discord server