Set Response Header Rules Tool
set_response_header_rules_toolReplace 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": {...}}}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"zone_id": "<zone_id>",
"rules": "<rules>"
},
"name": "set_response_header_rules_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | List of rule definitions | |
| zone_id | Yes | Zone ID (32-character hex string) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||