Skip to main content
Glama
rosschurchill

Technitium MCP Secure

dns_disable_zone

Disable a DNS zone to stop it from responding to queries while preserving all its records and settings.

Instructions

Disable a DNS zone. The zone will stop responding to queries but its records are preserved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zoneYesZone domain name to disable

Implementation Reference

  • The handler function that executes the dns_disable_zone tool logic. Validates the zone input, calls the /api/zones/disable API endpoint, and returns the result.
    {
      definition: {
        name: "dns_disable_zone",
        description:
          "Disable a DNS zone. The zone will stop responding to queries but its records are preserved.",
        inputSchema: {
          type: "object",
          properties: {
            zone: {
              type: "string",
              description: "Zone domain name to disable",
            },
          },
          required: ["zone"],
        },
      },
      readonly: false,
      handler: async (args) => {
        const zone = validateDomain(args.zone as string);
        const data = await client.callOrThrow("/api/zones/disable", { zone });
        return JSON.stringify(
          { success: true, disabled: zone, ...data },
          null,
          2
        );
      },
    },
  • The input schema definition for dns_disable_zone, specifying a required 'zone' string parameter with a description.
    {
      definition: {
        name: "dns_disable_zone",
        description:
          "Disable a DNS zone. The zone will stop responding to queries but its records are preserved.",
        inputSchema: {
          type: "object",
          properties: {
            zone: {
              type: "string",
              description: "Zone domain name to disable",
            },
          },
          required: ["zone"],
        },
      },
      readonly: false,
      handler: async (args) => {
        const zone = validateDomain(args.zone as string);
        const data = await client.callOrThrow("/api/zones/disable", { zone });
        return JSON.stringify(
          { success: true, disabled: zone, ...data },
          null,
          2
        );
      },
    },
  • Rate limit registration for dns_disable_zone, placing it in the 'mutateLimits' category (non-destructive write operations).
    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);
    }
    for (const tool of [
      "dns_create_zone", "dns_add_record", "dns_update_record",
      "dns_block_domain", "dns_allow_domain",
      "dns_remove_allowed", "dns_remove_blocked", "dns_delete_cached",
      "dns_enable_zone", "dns_disable_zone", "dns_set_zone_options",
      "dns_set_settings", "dns_install_app",
    ]) {
      this.toolLimits.set(tool, mutateLimits);
    }
  • src/index.ts:43-101 (registration)
    Main MCP server registration: tools are listed via ListToolsRequestSchema and invoked via CallToolRequestSchema, which maps tool names (including dns_disable_zone) to their handlers.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: tools.map((t) => t.definition),
    }));
    
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      const tool = toolMap.get(name);
    
      if (!tool) {
        return {
          content: [
            { type: "text" as const, text: JSON.stringify({ error: `Unknown tool: ${name}` }) },
          ],
          isError: true,
        };
      }
    
      // Rate limit check
      const rateCheck = rateLimiter.check(name);
      if (!rateCheck.allowed) {
        audit.logSecurity("rate_limited", `Tool ${name} rate limited`);
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                error: "Rate limited",
                retryAfterMs: rateCheck.retryAfterMs,
              }),
            },
          ],
          isError: true,
        };
      }
    
      const startTime = Date.now();
    
      try {
        const rawResult = await tool.handler((args || {}) as Record<string, unknown>);
    
        // Sanitize the response
        let sanitized: string;
        try {
          const parsed = JSON.parse(rawResult);
          sanitized = JSON.stringify(sanitizeResponse(parsed), null, 2);
        } catch {
          sanitized = rawResult;
        }
    
        audit.logToolCall(
          name,
          (args || {}) as Record<string, unknown>,
          "success",
          Date.now() - startTime
        );
    
        return {
          content: [{ type: "text" as const, text: sanitized }],
        };
  • The validateDomain helper function used by the handler to validate and normalize the zone domain string.
    export function validateDomain(domain: string): string {
      if (!domain || typeof domain !== "string") {
        throw new Error("Domain name is required");
      }
      const trimmed = domain.trim().toLowerCase();
      if (trimmed.length > 253) {
        throw new Error("Domain name exceeds maximum length of 253 characters");
      }
      if (!DOMAIN_RE.test(trimmed)) {
        throw new Error("Invalid domain name format");
      }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the disclosure burden. It discloses two key behavioral outcomes: the zone stops responding to queries and records are preserved. This goes beyond a simple restatement and helps the agent understand the tool's side effects. However, it does not mention reversibility (e.g., via dns_enable_zone) or any prerequisites, so it is not fully transparent.

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 description is two sentences with no padding. It leads with the action, then provides the critical behavioral consequence. Every word earns its place; it is appropriately sized for the tool's simplicity.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, no output schema, no annotations), the description covers the essential behavior: disabling the zone and preserving records. It does not explain how to re-enable it or what happens to existing queriers, but that is not strictly necessary for this operation. The description is complete enough for an agent to use the tool correctly.

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% for the single parameter 'zone', so the schema already fully documents the parameter. The description does not add any parameter-specific semantics beyond the schema, but the schema's description ('Zone domain name to disable') is sufficient, resulting in a baseline score of 3.

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 uses a specific verb ('Disable') and resource ('DNS zone'), and clearly distinguishes the action from related siblings like dns_delete_zone and dns_enable_zone by noting that records are preserved. The statement 'The zone will stop responding to queries but its records are preserved' adds scope and makes the purpose unmistakable.

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

Usage Guidelines3/5

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

The description implies a usage context: use this when you want to take a zone offline but retain its records. However, it does not explicitly compare against alternatives such as dns_delete_zone or dns_enable_zone, nor does it state when to prefer this over those. The implied usage is clear but no explicit guidance or exclusions are given.

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