Add Cloudflare DNS records
cloudflare_dns_record_addAdd 1–20 DNS records to a Cloudflare zone in one all-or-nothing batch, validating each record before sending. Create multiple A, AAAA, CNAME, MX, NS, TXT, CAA, or SRV records together.
Instructions
Add 1 to 20 DNS records to a Cloudflare zone in one batch: all are added or none is, and each record is checked before anything is sent. Types: A and AAAA (content is an address), CNAME, MX (also needs priority) and NS (content is a hostname), TXT (content is one line of text); CAA (data: flags, tag, value) and SRV (data: priority, weight, port, target; the name looks like _sip._tcp) take data instead of content. ttl is 1 for automatic or 60–86400 seconds (default 1). proxied (A, AAAA, CNAME; default false) needs an automatic ttl. comment is one line of up to 500 characters. A record name may be relative to the zone ('www'), '@' for the apex, or a full name. If the batch fails without telling whether it was applied, read the records with cloudflare_dns_read before sending it again. An existing record is changed with cloudflare_dns_record_edit and removed with cloudflare_dns_record_delete. 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>",
"records": "<records>"
},
"name": "cloudflare_dns_record_add"
}
}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. | |
| records | Yes | 1 to 20 new records, added together: all or none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone | Yes | The zone the records were added to. | |
| added | Yes | The records Cloudflare created, with their ids. | |
| label | Yes | The account label. |