Skip to main content
Glama

Remove a custom domain from a Cloudflare Pages project

cloudflare_pages_domain_remove
Destructive

Remove a custom hostname from a Cloudflare Pages project after confirmation, stopping visitors from reaching the site at that domain. This does not delete associated DNS records.

Instructions

Remove a custom domain, a hostname, from a Cloudflare Pages project; the tool always asks first in attended runs, since visitors to the hostname stop getting the site at once. The hostname must be one of the project's domains, as cloudflare_pages_read domains lists them; the result returns it as it was. Removing deletes no DNS record, and DNS changes stay with the cloudflare_dns_* tools. dns holds the records left at that name in the account's zone: a CNAME to the project's pages.dev address now answers with an error page, so offer to delete it with cloudflare_dns_record_delete, asking the person first, since the record may be wanted for something else. A step after the removal that fails is listed under errors and the domain stays removed. Adding a domain is cloudflare_pages_domain_add.

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": {
      "project": "<project>",
      "name": "<name>"
    },
    "name": "cloudflare_pages_domain_remove"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe custom domain's hostname, as in www.example.com: lowercased, with an internationalized name turned into punycode and a trailing dot dropped. No wildcard.
accountNoThe label of the credential pair to use, or "default" for the unlabeled one; left out, the unlabeled pair, else the only label.
projectYesThe Pages project's name, as `list` shows it: 1–58 lowercase letters, digits and `-`, starting with a letter or digit.

Output Schema

NameRequiredDescriptionDefault
dnsYesThe records left at that name in the account's zone, or null when the account has no such zone. A CNAME to the project's pages.dev address now answers with an error page: offer to delete it with cloudflare_dns_record_delete, asking the person first, since the record may be wanted for something else.
labelYesThe account label.
errorsNoThe steps that failed after the write was done, keyed by step, as `code: message`; absent when none did.
projectYesThe Pages project's name.
removedYesThe domain as it was before it was removed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds substantive context beyond that: the tool prompts for confirmation in attended runs, visitors to the hostname lose the site immediately, DNS records are preserved, a CNAME to pages.dev will now serve an error page, and partial failures surface under `errors` while the domain stays removed. That partial-success semantics note is exactly the kind of behavior an agent cannot infer from annotations.

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?

Purpose is front-loaded in the first clause and every subsequent sentence carries operational content. It is dense and slightly run-on with heavy backtick usage, but nothing is redundant filler.

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?

Although an output schema exists, the description still explains the two things an agent most needs to interpret it: what `dns` represents (records left at the name in the zone) and how `errors` interacts with the removal outcome. For a destructive, non-idempotent, open-world operation, the safety and follow-up picture is complete.

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 all three parameters are fully documented in the schema (including punycode/lowercasing rules for `name` and the naming constraints for `project`). The description adds only the constraint that the hostname must be an existing project domain; the `dns` reference is a return field, not a parameter. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Remove a custom domain... from a Cloudflare Pages project') and immediately scopes it: this is hostname-level removal, not project deletion and not DNS record deletion. It names the counterpart tool cloudflare_pages_domain_add so an agent can distinguish removal from creation without inspecting schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Prerequisites are explicit (the hostname must already be one of the project's domains, verifiable via cloudflare_pages_read domains) and the boundaries are spelled out: DNS records are untouched, DNS work belongs to cloudflare_dns_* tools, and adding is a different tool. It also directs a follow-up offer to cloudflare_dns_record_delete with a caution to ask the person first, which is genuine routing guidance.

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