Skip to main content
Glama
Cloudflare Workers MCP Server

Cloudflare Workers MCP Server

Delete Worker Domain

delete_worker_domain
Destructive

Detach a custom domain from a Cloudflare Worker so its hostname stops routing to the Worker and its previews. Use the domain attachment ID from list_worker_domains.

Instructions

Detach a custom domain from its Worker. The hostname stops routing to the Worker (and its previews).

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": {
      "domain_id": "<domain_id>"
    },
    "name": "delete_worker_domain"
  }
}

Input Schema

NameRequiredDescriptionDefault
domain_idYesDomain attachment ID (from list_worker_domains)

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, idempotentHint=false, and openWorldHint=true, so the safety profile is covered structurally. The description still adds real value beyond them by naming the concrete consequence: the hostname stops routing to the Worker and its previews, which an agent could not infer from the hints alone. It stops short of saying whether the DNS record or the domain attachment itself is destroyed and whether the change is reversible.

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?

Two short sentences with zero filler, and the most important fact (what detaching does to routing) is front-loaded immediately after the action statement.

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 one-parameter destructive operation with no output schema, the description covers the action and its routing consequence adequately. The only missing pieces are whether the underlying DNS/attachment record is removed and what is returned on success, but these are minor for a tool of this complexity.

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 coverage is 100% and there is a single required parameter, so the schema already fully documents domain_id including its source (list_worker_domains). The description adds no further meaning about the identifier's format or behavior, so the baseline of 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?

The description uses a specific verb ("Detach") plus resource ("a custom domain from its Worker"), which is unambiguous and clearly distinct from add_worker_domain and list_worker_domains. It does not name those siblings explicitly, but the operation is easy to distinguish from them by intent alone.

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?

Usage is only implied: an agent can infer this is the removal counterpart to adding a domain, and the schema's "from list_worker_domains" hints at the discovery step. There is no explicit statement of when to use this versus alternatives or any prerequisite caution before detaching.

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