Delete Cloudflare DNS records
cloudflare_dns_record_deleteDelete 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
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | 0 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. | |
| ids | Yes | 1 to 20 ids of the records to delete (32 hex digits each; cloudflare_dns_read list shows them); all or none. | |
| zone | Yes | The zone domain or 32-hex id. | |
| account | No | The label of the credential pair to use, or "default" for the unlabeled one; left out, the unlabeled pair, else the only label. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone | Yes | The zone the records belonged to. | |
| added | Yes | The records Cloudflare created, with their ids; empty when `add` was left out. | |
| label | Yes | The account label. | |
| deleted | Yes | The records as they were before the delete, in the order of `ids`; they no longer exist. |