Skip to main content
Glama

Change Cloudflare DNS records

cloudflare_dns_record_edit
DestructiveIdempotent

Edit 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

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.
changesYes1 to 20 records to change, each by id with only the fields to change; all or none.

Output Schema

NameRequiredDescriptionDefault
zoneYesThe zone the records belong to.
labelYesThe account label.
changedYesThe records that changed, in the order of `changes`.

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?

Annotations declare destructive=true, idempotent=true, openWorld=true, readOnly=false, and the description adds substantially beyond that: all-or-none atomicity, a pre-flight check against current values, refusal of externally-managed records and no-op changes, the before/after result shape, and the retry-after-ambiguous-failure caution. It also constrains zone lookup to the account's own zones.

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?

The batch/atomicity contract is front-loaded and each sentence carries distinct semantics (patch semantics, type immutability, ownership refusal, TTL rule, result shape, retry guidance). It is dense but not padded; a light bullet structure would have improved scanability for this much conditional detail.

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, everything an agent needs is present: atomicity, patch semantics, refusal conditions, cross-field validation, sibling routing for type changes, and retry guidance. Return values are mentioned even though an output schema exists.

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 per-parameter meaning is already carried by the schema, including the 'leave out to keep it' pattern. The description still adds genuine cross-field rules the schema cannot express: validation applies to the record as it would be after the change, and a proxied record therefore requires an automatic TTL. It also ties `type` to current-value matching rather than change.

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 (change), resource (existing DNS records), and scope (1 to 20, one batch, one zone). The batch/patch semantics distinguish it immediately from cloudflare_dns_record_add and cloudflare_dns_record_delete, which are named later in the text.

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 routes the agent elsewhere for type changes ('use cloudflare_dns_record_delete with the replacement in its add'), states that changes to records owned by other Cloudflare products are refused, that no-op changes are refused, and gives a concrete recovery procedure (read records with cloudflare_dns_read before retrying) after an ambiguous failure.

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