Skip to main content
Glama

Delete Cloudflare DNS records

cloudflare_dns_record_delete
Destructive

Delete 1 to 20 Cloudflare DNS records in one all-or-none batch, optionally adding replacement records in the same call to change a record's type or swap it.

Instructions

Delete 1 to 20 DNS records of a Cloudflare zone by id (cloudflare_dns_read list shows it) in one batch: all are deleted or none is, and the tool always asks first in attended runs. add holds up to 20 records created in the same batch, in the form of cloudflare_dns_record_add and checked by its rules; Cloudflare runs the deletes first, so a replacement can take the deleted record's name. A record's type cannot change in place: delete the old record and add the new one with the same name in one call; a swap works the same way. Records managed by another Cloudflare product (a Worker's custom domain, for one) are refused. A deleted record stops answering at once, though resolvers may keep it up to its TTL. The result lists the deleted records as they were, and the records added. If the batch fails without telling whether it was applied, read the records with cloudflare_dns_read before sending it again. Zones are looked up only in the account's own zones.

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": {
      "zone": "<zone>",
      "ids": "<ids>"
    },
    "name": "cloudflare_dns_record_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
addNo0 to 20 new records, in the form of cloudflare_dns_record_add: records added in the same batch, replacing the deleted ones: a type change or a swap is one call.
idsYes1 to 20 ids of the records to delete (32 hex digits each; cloudflare_dns_read list shows them); all or none.
zoneYesThe zone domain or 32-hex id.
accountNoThe label of the credential pair to use, or "default" for the unlabeled one; left out, the unlabeled pair, else the only label.

Output Schema

NameRequiredDescriptionDefault
zoneYesThe zone the records belonged to.
addedYesThe records Cloudflare created, with their ids; empty when `add` was left out.
labelYesThe account label.
deletedYesThe records as they were before the delete, in the order of `ids`; they no longer exist.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: atomic all-or-none semantics, an interactive confirmation in attended runs, delete-before-add ordering so a replacement can reuse a name, immediate cessation of answers with TTL-based resolver caching, and the shape of the returned result. The only gap is that "not idempotent" and the retry hazard are implied via the ambiguous-failure note rather than stated as a firm rule.

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-loaded with the core action and scope, then layered with batch semantics, ordering, refusals, and recovery advice. Dense but nearly every sentence carries distinct information; the zone-lookup note at the end is the weakest addition.

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 destructive, batched mutation tool with an output schema, this covers atomicity, ordering, refusal cases, user confirmation, failure recovery, and result contents. Nothing an agent needs to invoke it safely is missing.

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 baseline is 3, but the description adds real meaning: `ids` are drawn from cloudflare_dns_read list output, and `add` entries follow cloudflare_dns_record_add's schema and validation rules within the same batch. It does not restate field-level constraints, which the schema already covers.

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 ("Delete 1 to 20 DNS records of a Cloudflare zone by id ... in one batch") with scope limits. It also implicitly distinguishes itself from cloudflare_dns_record_edit by noting a record's type cannot change in place, so delete+add in one call is the route.

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?

Explicitly tells the agent when to pair deletes with `add` (type change, swap in a single call), when to re-read with cloudflare_dns_read after an ambiguous batch failure, and where ids come from. It also carves out what is refused (records managed by another Cloudflare product such as a Worker custom domain).

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