Skip to main content
Glama
Cloudflare Workers MCP Server

Cloudflare Workers MCP Server

Delete Worker

delete_worker
Destructive

Permanently deletes a Cloudflare Worker script and its versions, deployments, and static assets; use the force option to remove it even when dependent resources exist.

Instructions

Permanently delete a Worker script, including its versions, deployments, and any static assets. Set force to delete even when other resources depend on it.

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": {
      "script_name": "<script_name>"
    },
    "name": "delete_worker"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoDelete even if other resources (e.g. routes) depend on the Worker
script_nameYesThe name of the Worker script to delete

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is covered. The description adds genuinely non-redundant behavior: deletion cascades to versions, deployments, and static assets, and dependent resources block deletion unless force is set. It does not mention auth requirements or whether the cascade is recoverable, which keeps it short of a 5.

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?

Two short sentences, front-loaded with the destructive scope and followed by the one non-obvious parameter behavior. No filler, though the second sentence could have been folded into the first for tighter structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, fully documented tool with an output schema absent and annotations covering the safety profile, the description supplies exactly what structured data cannot: what else gets destroyed and how dependencies interact with the force flag.

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

Parameters3/5

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

Schema description coverage is 100%, and the description's note that force overrides dependency protection largely restates the schema text for that parameter. It adds no syntax, format, or default details beyond the schema, so the baseline 3 applies.

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 ('Permanently delete a Worker script') and enumerates the cascade scope (versions, deployments, static assets). It does not explicitly name a sibling to contrast with, but the resource name makes confusion with delete_worker_domain or delete_preview unlikely.

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 second sentence gives actionable guidance on when to set force ('to delete even when other resources depend on it'), which implies force should otherwise be omitted. However, there is no explicit statement of when to prefer this tool over siblings like delete_preview or rollback_worker, nor any prerequisite or confirmation guidance.

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