Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

Set Url Rewrite Rules Tool

set_url_rewrite_rules_tool

Replace all URL rewrite rules for a Cloudflare zone to manage path and query redirects.

Instructions

Set URL rewrite rules (replaces all existing rules).

Each rule should have:

  • expression: Filter expression

  • description: Human-readable description

  • action: "rewrite"

  • action_parameters: {"uri": {"path": {"value": "..."}, "query": {"value": "..."}}}

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

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

With no annotations provided, the description carries the full disclosure burden. It surfaces one genuinely important trait ('replaces all existing rules'), which tells the agent this is a destructive full-overwrite rather than an append. However, it omits auth/permission requirements, idempotency, and rate-limit behavior expected of an unannotated 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The destructive replacement warning is front-loaded in the opening line, then a tight bulleted list defines the rule shape. Every sentence earns its place with no filler, and the format is easy for an agent to parse.

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 no explanation, and the description covers the rule payload shape and the overwrite semantics an agent needs before calling. It is nearly complete, with only environment/prerequisite context left unstated.

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%, so the baseline is 3, and the description earns above that by documenting the structure of the otherwise opaque 'rules' array items (expression, description, action, action_parameters with a concrete JSON example). This compensates for the schema leaving rule items as bare 'additionalProperties: true' objects.

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?

States a specific verb and resource ('Set URL rewrite rules') and adds a critical scope note that it 'replaces all existing rules', which cleanly separates it from the list_url_rewrite_rules_tool sibling. It does not explicitly name an alternative tool, but the purpose is unambiguous.

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 parenthetical 'replaces all existing rules' implies full-replacement usage and is the key operational context, but there is no explicit when-to-use vs. when-not, no mention of a sibling alternative, and no stated prerequisites. Usage is implied rather than guided.

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