Change Cloudflare DNS records
cloudflare_dns_record_editEdit up to 20 existing Cloudflare DNS records in one atomic batch by record ID, changing only specified fields and validating each against current values before sending.
Instructions
Change 1 to 20 existing DNS records of a Cloudflare zone in one batch: all are changed or none is, and each change is checked against the record's current values before anything is sent. Each change names a record by id (cloudflare_dns_read list shows it) and gives only the fields to change; fields left out keep their value, and an empty comment removes the comment. A record's type cannot change in place: use cloudflare_dns_record_delete with the replacement in its add. Records managed by another Cloudflare product (a Worker's custom domain, for one) are refused, and so are changes that change nothing. The values follow the rules of cloudflare_dns_record_add, applied to the record as it would be after the change; for example a proxied record needs an automatic ttl. The result lists each record before and after. 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>",
"changes": "<changes>"
},
"name": "cloudflare_dns_record_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| changes | Yes | 1 to 20 records to change, each by id with only the fields to change; all or none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone | Yes | The zone the records belong to. | |
| label | Yes | The account label. | |
| changed | Yes | The records that changed, in the order of `changes`. |