Skip to main content
Glama

Add Cloudflare DNS records

cloudflare_dns_record_add

Add 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

NameRequiredDescriptionDefault
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.
recordsYes1 to 20 new records, added together: all or none.

Output Schema

NameRequiredDescriptionDefault
zoneYesThe zone the records were added to.
addedYesThe records Cloudflare created, with their ids.
labelYesThe account label.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations: it states batch atomicity ('all are added or none is'), that records are validated before anything is sent, and how to recover from a failure that leaves the applied state unknown. It also discloses the non-idempotent retry hazard, cross-field constraints (proxied requires automatic ttl), and the 500-character comment limit — real behavioral context the hints alone do not convey.

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 atomicity guarantee, then the type rules, then the failure-recovery and sibling routing — a sensible order with no filler sentences. It is dense to the point of being a wall of text, and the type enumeration is long, but every clause carries a constraint.

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?

An output schema exists, so return values need no explanation, and the annotations carry the safety profile. For a non-idempotent batch mutation the description covers what matters: atomicity, pre-send validation, retry-after-read recovery, per-type field requirements, and default TTL/proxied behavior.

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 the baseline is 3; the description earns an extra point by laying out the type-to-field contract in one place (content for A/AAAA/CNAME/MX/TXT/NS, data for CAA/SRV, MX priority at top level vs SRV priority inside data) and by explaining the name forms ('www', '@', full). Much of this overlaps the schema's own field descriptions, so it is reinforcement rather than wholly new meaning.

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?

Opens with a specific verb, resource, and scope: 'Add 1 to 20 DNS records to a Cloudflare zone in one batch.' It then explicitly contrasts itself with siblings for modification ('cloudflare_dns_record_edit') and removal ('cloudflare_dns_record_delete'), so an agent can separate this tool from adjacent ones without reading any schema.

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?

Names the alternatives and the conditions that select them: existing records go to edit, removal goes to delete, and an ambiguous batch failure should be resolved with cloudflare_dns_read before resending. It also bounds zone lookup to the account's own zones, which heads off a wrong-account attempt.

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