Skip to main content
Glama

Upsert DNS record

upsert_dns_record
Destructive

Add or update a forward DNS record in a native zone by name, type, and content. Identical records update TTL/comment and re-enable disabled entries; different content creates another record.

Instructions

Add a forward DNS desired-state record to a native zone, identified by name, type and content together. Different content adds another record and keeps existing values; it does not replace them. An identical tuple updates its TTL/comment and re-enables it if disabled. To replace an existing record's content, read get_dns_zone and pass its exact record_id to update_dns_record. Changes affect public answers after publication. PTR and *.arpa are rejected; use change_rdns for reverse DNS. Requires dns:write when using an API key.

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_id": "<zone_id>",
      "name": "<name>",
      "type": "<type>",
      "content": "<content>"
    },
    "name": "upsert_dns_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
ttlNoTTL in seconds, allowed range 60-604800. Defaults to 120.
nameYesRecord name. Use @ for apex, or a relative name inside the zone.
typeYesDNS record type. PTR is intentionally not supported here.
commentNoOptional note about this record, max 255 chars.
contentYesDNS record value for the selected type
zone_idYesDNS zone ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.16

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the mutation/safety profile (readOnlyHint=false, destructiveHint=true, idempotentHint=false, openWorldHint=true); the description goes well beyond that by spelling out that differing content appends rather than replaces, identical tuples only update TTL/comment and re-enable disabled records, changes surface publicly only after publication, and dns:write is required for API-key use. These are non-obvious behaviors that materially change how an agent sequences calls.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The most decision-relevant fact (upsert semantics: same tuple updates, different content appends) leads, followed by the replacement path, side effects, exclusions, and auth. Six dense sentences with no filler or restatement of the title.

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 mutation tool with no output schema, the description covers mutation semantics, idempotency behavior, publication timing, unsupported types, a required permission, and the correct alternative calls. Nothing needed to invoke it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents ttl, name, type, comment, content and zone_id, and the enum for type. The description reinforces the name/type/content tuple semantics but adds no formats or constraints beyond the schema, making the baseline 3 correct.

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?

The description states a specific verb (Add/upsert) and resource (forward DNS desired-state record in a native zone) plus the identifying tuple (name, type, content together), which is exactly what distinguishes it from update_dns_record's record_id-based editing. It also names the reverse-DNS sibling it is not (change_rdns) and the PTR/*.arpa exclusion. An agent can select it correctly without opening a 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?

Explicit when-to-use rules are given: new/identical tuples follow upsert semantics, while replacing existing content requires reading get_dns_zone and calling update_dns_record with the exact record_id. It also routes reverse DNS to change_rdns. Both alternatives and their triggering conditions are named.

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

Deploy Server

Other Tools