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");
      }
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that queries stop but records are preserved, which is the key behavioral trait. Could mention reversibility via dns_enable_zone or permissions needed.

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?

Two sentences, front-loaded with the action and effect. No wasted words; every sentence adds value.

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?

For a simple tool with one parameter and no output schema, the description is mostly complete. It explains what happens to the zone. Could add a note about being reversible or response behavior, but overall adequate.

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?

The schema already describes the single parameter 'zone' as 'Zone domain name to disable', and the description adds no further meaning. With 100% schema coverage, baseline is 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 clearly states the action (disable a DNS zone) and its effect (stops responding to queries but records preserved). It effectively distinguishes from siblings like dns_delete_zone, which would remove the zone.

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 usage (when you want to temporarily disable a zone), but does not explicitly state when to use versus alternatives like dns_enable_zone or dns_delete_zone. No direct guidance is provided.

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