Skip to main content
Glama
Official Porkbun MCP Server

Official Porkbun MCP Server

Create DNS Record

create_dns_record
Idempotent

Adds a DNS record to a domain in the authenticated Porkbun account and returns its ID for later updates or deletion. Use it for A, AAAA, CNAME, MX, TXT, and other supported record types.

Instructions

Create a DNS record on a domain in the authenticated account. Returns the new record's id as a string, the same form list_dns_records and existingId use, so it can be passed straight to update_dns_record and delete_dns_record. For the name field: omit or pass empty string for the apex/root, otherwise pass the subdomain prefix only (e.g. www, not www.example.com). For MX and SRV records, set prio (priority). SMIMEA takes TLSA-style content -- usage selector matching_type certificate-hex -- at <hash>._smimecert.<domain>. OPENPGPKEY takes a base64 OpenPGP public key at <hash>._openpgpkey.<domain>, max 2500 characters; export a minimal key (gpg --export --export-options export-minimal), because a full key with photo IDs will not fit. Both are only meaningful in a DNSSEC-signed zone. DS here is for delegating a SUBDOMAIN to someone else's signed nameservers (name must be that subdomain, content keytag algorithm digesttype digest) -- a DS at the apex is refused, because the chain of trust for the domain itself lives at the registry: use create_dnssec_record for that. Free, doesn't spend account credit. If a record with this exact name, type and content already exists the call fails with DUPLICATE_RECORD and returns that record's id in existingId — use it rather than retrying or creating a variant. If a CNAME would share a name with another record type (forbidden by RFC 1034) the call fails with RECORD_CONFLICT and lists the blocking rows in conflictingRecords; delete those or pick another name.

Check warnings in the response and pass it on. Porkbun keeps a DNS zone for every domain in the account whether or not the domain is delegated to Porkbun's nameservers, so this write succeeds either way. If the domain points somewhere else, the response is still SUCCESS but carries a warnings string naming the nameservers that actually answer — the record exists and nothing resolves differently. Do not report plain success in that case: either make the change at the provider that runs those nameservers, or offer update_nameservers to point the domain at Porkbun.

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": {
      "domain": "<domain>",
      "type": "<type>",
      "content": "<content>"
    },
    "name": "create_dns_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
ttlNoTime-to-live in seconds. Minimum 60. Defaults to 600 if omitted.
nameNoSubdomain prefix (no domain). Empty string or omitted = apex. Examples: `www`, `mail`, `api.staging`.
prioNoPriority — required for MX and SRV records, ignored otherwise.
typeYesRecord type. Common: A, AAAA, CNAME, MX, TXT.
domainYesDomain to add the record to, e.g. `example.com`
contentYesRecord value (e.g. an IP for A, a hostname for CNAME, the text body for TXT).
dry_runNoIf true, validate only — returns wouldSucceed without creating the record.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.65.22
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "A",
      -  "AAAA",
      -  "CNAME",
      -  "MX",
      -  "TXT",
      -  "NS",
      -  "ALIAS",
      -  "SRV",
      -  "TLSA",
      -  "CAA",
      -  "SSHFP",
      -  "HTTPS",
      -  "SVCB"
      -]New value: +[
      +  "A",
      +  "AAAA",
      +  "CNAME",
      +  "MX",
      +  "TXT",
      +  "NS",
      +  "ALIAS",
      +  "SRV",
      +  "TLSA",
      +  "CAA",
      +  "SSHFP",
      +  "HTTPS",
      +  "SVCB",
      +  "SMIMEA",
      +  "OPENPGPKEY",
      +  "DS"
      +]
  2. Changed1 schema field changedv0.39.4
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "If true, validate only — returns wouldSucceed without creating the record.",
      +  "type": "boolean"
      +}
  3. First observedv0.4.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare the mutation is non-destructive, idempotent and closed-world; the description adds far more: no account credit is spent, duplicate creates fail with `DUPLICATE_RECORD` plus `existingId`, CNAME collisions fail with `RECORD_CONFLICT` plus `conflictingRecords`, and writes succeed even on non-delegated domains with a `warnings` string the agent must surface. That last point is a genuine behavioral trap the annotations cannot express.

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 return value, then organized by parameter and failure mode, so an agent can scan it. It is long and repeats some `name`/`prio` semantics already in the schema, but nearly every sentence carries operational information, so the length is mostly justified.

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?

With no output schema, the description supplies the return shape (`id` as a string, usable by `update_dns_record`/`delete_dns_record`), the error payloads (`existingId`, `conflictingRecords`), and the success-with-warnings case. For a 7-parameter mutation with several record-type special cases, nothing an agent needs in order to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is already 100%, but the description still adds semantics the schema lacks: `name` is a prefix only (`www`, not `www.example.com`), content format for SMIMEA (`usage selector matching_type certificate-hex` at `<hash>._smimecert.<domain>`), OPENPGPKEY base64/minimal-key/2500-char limit, and DS content as `keytag algorithm digesttype digest`.

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 and resource ("Create a DNS record on a domain in the authenticated account") and immediately clarifies the return value. It also distinguishes itself from the nearest ambiguous sibling by explaining that apex DS records belong to `create_dnssec_record`, not this tool.

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 guidance for every non-obvious case: omit/empty `name` for apex, `prio` for MX/SRV, subdomain-only DS delegations, and the DNSSEC-signed-zone precondition for SMIMEA/OPENPGPKEY. It names alternatives and the exact condition that selects them (`create_dnssec_record` for apex DS, `update_nameservers` when the zone is hosted elsewhere).

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