Skip to main content
Glama
rosschurchill

Technitium MCP Secure

dns_delete_record

Delete a specific DNS record from a zone. Requires confirm=true to execute, preventing accidental removals.

Instructions

Delete a specific DNS record from a zone. Requires confirm=true to execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zoneYesZone domain name
domainYesDomain name of the record
typeYesRecord type
valueYesRecord value to delete (IP for A/AAAA, etc)
confirmNoMust be true to confirm deletion. Without this, returns a warning instead of deleting.

Implementation Reference

  • The main handler function for dns_delete_record. Validates inputs (zone, domain, type, value), requires confirm=true to proceed, constructs the API params based on record type, then calls /api/zones/records/delete on the Technitium DNS server.
    handler: async (args) => {
      const zone = validateDomain(args.zone as string);
      const domain = validateDomain(args.domain as string);
      const recType = validateRecordType(args.type as string);
      const value = args.value as string;
    
      if (args.confirm !== true) {
        return JSON.stringify(
          {
            warning: `This will delete the ${recType} record for '${domain}' (value: ${value}). Set confirm=true to proceed.`,
          },
          null,
          2
        );
      }
    
      const params: Record<string, string> = {
        zone,
        domain,
        type: recType,
      };
    
      if (recType === "A" || recType === "AAAA") {
        params.ipAddress = validateIp(value);
      } else if (recType === "CNAME") {
        params.cname = value;
      } else if (recType === "MX") {
        params.exchange = value;
      } else if (recType === "TXT") {
        params.text = value;
      } else if (recType === "NS") {
        params.nameServer = value;
      }
    
      const data = await client.callOrThrow(
        "/api/zones/records/delete",
        params
      );
      return JSON.stringify(
        {
          success: true,
          deleted: `${recType} ${domain} -> ${value}`,
          ...data,
        },
        null,
        2
      );
    },
  • The input schema definition for dns_delete_record, specifying required parameters: zone, domain, type (enum of A/AAAA/CNAME/MX/NS/PTR/TXT/SRV/CAA), value, and optional confirm boolean.
    name: "dns_delete_record",
    description:
      "Delete a specific DNS record from a zone. Requires confirm=true to execute.",
    inputSchema: {
      type: "object",
      properties: {
        zone: { type: "string", description: "Zone domain name" },
        domain: {
          type: "string",
          description: "Domain name of the record",
        },
        type: {
          type: "string",
          enum: [
            "A",
            "AAAA",
            "CNAME",
            "MX",
            "NS",
            "PTR",
            "TXT",
            "SRV",
            "CAA",
          ],
          description: "Record type",
        },
        value: {
          type: "string",
          description: "Record value to delete (IP for A/AAAA, etc)",
        },
        confirm: {
          type: "boolean",
          description:
            "Must be true to confirm deletion. Without this, returns a warning instead of deleting.",
        },
      },
      required: ["zone", "domain", "type", "value"],
    },
  • Registration of dns_delete_record as a ToolEntry with its definition, handler, and readonly=false flag. Exported via recordTools() -> getAllTools() in src/tools/index.ts -> used in src/index.ts server setup.
      {
        definition: {
          name: "dns_delete_record",
          description:
            "Delete a specific DNS record from a zone. Requires confirm=true to execute.",
          inputSchema: {
            type: "object",
            properties: {
              zone: { type: "string", description: "Zone domain name" },
              domain: {
                type: "string",
                description: "Domain name of the record",
              },
              type: {
                type: "string",
                enum: [
                  "A",
                  "AAAA",
                  "CNAME",
                  "MX",
                  "NS",
                  "PTR",
                  "TXT",
                  "SRV",
                  "CAA",
                ],
                description: "Record type",
              },
              value: {
                type: "string",
                description: "Record value to delete (IP for A/AAAA, etc)",
              },
              confirm: {
                type: "boolean",
                description:
                  "Must be true to confirm deletion. Without this, returns a warning instead of deleting.",
              },
            },
            required: ["zone", "domain", "type", "value"],
          },
        },
        readonly: false,
        handler: async (args) => {
          const zone = validateDomain(args.zone as string);
          const domain = validateDomain(args.domain as string);
          const recType = validateRecordType(args.type as string);
          const value = args.value as string;
    
          if (args.confirm !== true) {
            return JSON.stringify(
              {
                warning: `This will delete the ${recType} record for '${domain}' (value: ${value}). Set confirm=true to proceed.`,
              },
              null,
              2
            );
          }
    
          const params: Record<string, string> = {
            zone,
            domain,
            type: recType,
          };
    
          if (recType === "A" || recType === "AAAA") {
            params.ipAddress = validateIp(value);
          } else if (recType === "CNAME") {
            params.cname = value;
          } else if (recType === "MX") {
            params.exchange = value;
          } else if (recType === "TXT") {
            params.text = value;
          } else if (recType === "NS") {
            params.nameServer = value;
          }
    
          const data = await client.callOrThrow(
            "/api/zones/records/delete",
            params
          );
          return JSON.stringify(
            {
              success: true,
              deleted: `${recType} ${domain} -> ${value}`,
              ...data,
            },
            null,
            2
          );
        },
      },
    ];
  • validateRecordType helper used by the handler to validate and normalize the DNS record type.
    export function validateRecordType(type: string): string {
      if (!type || typeof type !== "string") {
        throw new Error("Record type is required");
      }
      const upper = type.trim().toUpperCase();
      if (!VALID_RECORD_TYPES.has(upper)) {
        throw new Error(`Invalid record type: ${upper}`);
      }
      return upper;
    }
  • Rate limiting registration classifying dns_delete_record as a destructive operation (5 requests per 60s window).
    for (const tool of [
      "dns_delete_zone", "dns_delete_record", "dns_flush_cache",
      "dns_flush_allowed", "dns_flush_blocked", "dns_uninstall_app",
      "dns_update_blocklists", "dns_temp_disable_blocking",
    ]) {
      this.toolLimits.set(tool, destructiveLimits);
    }
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It mentions the confirm flag but fails to address irreversibility, required permissions, side effects, or the response format. For a destructive operation, this is insufficient.

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 very short (two sentences) and front-loaded with the core action. It avoids fluff, but its brevity leaves out important details for completeness.

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?

For a deletion tool with no output schema or annotations, the description lacks information on return values, success indicators, and consequences. It does not address how this tool fits among many similar sibling tools.

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%, so all parameters are already described in the input schema. The description adds no additional meaning or examples beyond what the schema provides, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (delete) and target (specific DNS record from a zone). It distinguishes from siblings like add or update, though it could be more explicit about the irreversible nature of deletion.

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 includes the critical requirement 'confirm=true to execute', but provides no guidance on when to use this tool versus alternatives like update_record or delete_cached. No exclusions or context for selection among many related siblings.

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/rosschurchill/technitium-mcp-secure'

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