Skip to main content
Glama

delete_nameserver

Remove a registered nameserver by hostname or delete all nameservers associated with a domain.

Instructions

Delete a registered nameserver by hostname, or delete all nameservers associated with a domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoNameserver hostname to delete
domainNoDelete all nameservers for this domain instead

Implementation Reference

  • Tool handler for 'delete_nameserver'. Accepts optional 'host' (delete a specific nameserver by hostname) or 'domain' (delete all nameservers for a domain). Calls client.deleteNameserver(host) or client.deleteNameserverByDomain(domain) accordingly.
    // ─── delete_nameserver ────────────────────────────────────────
    
    server.tool(
      "delete_nameserver",
      "Delete a registered nameserver by hostname, or delete all nameservers " +
        "associated with a domain.",
      {
        host: z
          .string()
          .optional()
          .describe("Nameserver hostname to delete"),
        domain: z
          .string()
          .optional()
          .describe("Delete all nameservers for this domain instead"),
      },
      async ({ host, domain }) => {
        try {
          let result;
          if (domain) {
            result = await client.deleteNameserverByDomain(domain);
          } else if (host) {
            result = await client.deleteNameserver(host);
          } else {
            return {
              content: [
                { type: "text" as const, text: "Either host or domain is required" },
              ],
              isError: true,
            };
          }
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to delete nameserver: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Client method deleteNameserver(host) that calls the Dynadot API 'delete_ns' with the given host parameter.
    async deleteNameserver(host: string): Promise<DynadotResponse> {
      return this.call("delete_ns", { host });
    }
  • Client method deleteNameserverByDomain(domain) that calls the Dynadot API 'delete_ns_by_domain' with the given domain parameter.
    async deleteNameserverByDomain(domain: string): Promise<DynadotResponse> {
      return this.call("delete_ns_by_domain", { domain });
    }
  • Zod schema for the delete_nameserver tool: optional 'host' (string) and optional 'domain' (string), at least one must be provided.
    {
      host: z
        .string()
        .optional()
        .describe("Nameserver hostname to delete"),
      domain: z
        .string()
        .optional()
        .describe("Delete all nameservers for this domain instead"),
    },
  • src/tools/dns.ts:18-21 (registration)
    The registerDnsTools function registers all DNS tools (including delete_nameserver) on the MCP server instance.
    export function registerDnsTools(
      server: McpServer,
      client: DynadotClient
    ): void {
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states the action (delete) but omits side effects, error handling, idempotency, authentication requirements, or return value.

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 description is a single concise sentence conveying the core functionality. It could be slightly more structured (e.g., bullet points) but is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no annotations, and two parameters with implied exclusivity, the description lacks completeness. It does not explain error scenarios, return format, or parameter precedence.

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 coverage is 100% with descriptions. The description adds context ('by hostname' for host, 'for this domain' for domain) and implies mutual exclusivity. However, it does not clarify behavior if both parameters are provided.

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 clearly states the tool's purpose: deleting a nameserver by hostname or deleting all nameservers for a domain. It is specific and distinguishes from sibling tools like add_nameserver and register_nameserver.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool vs alternatives, no prerequisites (e.g., domain must exist), and no exclusions or conditions. It only states two modes without direction on selecting one.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/dynadot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server