Skip to main content
Glama
crunchtools

mcp-cloudflare-crunchtools

by crunchtools

set_url_rewrite_rules_tool

Replace all existing URL rewrite rules for a Cloudflare zone by providing expressions, descriptions, and URI path or query rewrite actions.

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

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

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

With no annotations, the description carries the full burden. It usefully discloses the destructive bulk-replace semantics, which is the key behavioral trait, but omits permission requirements, reversibility, and failure modes. Partial disclosure for a mutation tool with zero annotation coverage.

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-loads the destructive replacement note, then documents rule shape and arguments compactly. Slightly verbose in the rule example, but every line earns its place.

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 destructive tool with an output schema and no annotations, the description supplies the replacement behavior, the rule object structure, and the zone_id format. It leaves auth/permission context unstated, which is a minor gap given no annotation coverage.

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% and the rules parameter is an opaque array of generic objects, yet the description enumerates the expected rule fields (expression, description, action, action_parameters) with a nested example, and documents zone_id as a 32-character hex string. This adds substantial meaning beyond the raw 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?

States a specific verb and resource ('Set URL rewrite rules') and immediately clarifies the operation is a full replacement ('replaces all existing rules'). This distinguishes it from list_url_rewrite_rules_tool, though it does not explicitly name or contrast with sibling set_*_rules tools.

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 when this is appropriate versus incremental edits, but there is no explicit when-to-use guidance, no exclusions, and no reference to the sibling list or header-rule tools. Usage is inferable but not stated.

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