Skip to main content
Glama
rosschurchill

Technitium MCP Secure

dns_list_allowed

List allowed DNS zones that bypass block lists. Start with top-level zones, then drill into subdomains by passing a parent domain.

Instructions

List allowed DNS zones (domains that bypass block lists). Returns a hierarchical tree — call with no domain to see top-level zones, then pass a domain (e.g. 'com') to drill into subdomains.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoOptional parent domain to list children of (e.g. 'com' to see all allowed .com domains). Omit to see top-level zones.

Implementation Reference

  • Full definition and handler for the dns_list_allowed tool. The tool is defined with name 'dns_list_allowed', accepts an optional 'domain' parameter, and its handler calls the API endpoint /api/allowed/list with the optional domain parameter (validated via validateDomain). Returns the JSON response from the Technitium DNS server.
    {
      definition: {
        name: "dns_list_allowed",
        description:
          "List allowed DNS zones (domains that bypass block lists). Returns a hierarchical tree — call with no domain to see top-level zones, then pass a domain (e.g. 'com') to drill into subdomains.",
        inputSchema: {
          type: "object",
          properties: {
            domain: {
              type: "string",
              description:
                "Optional parent domain to list children of (e.g. 'com' to see all allowed .com domains). Omit to see top-level zones.",
            },
          },
        },
      },
      readonly: true,
      handler: async (args) => {
        const params: Record<string, string> = {};
        if (args.domain) params.domain = validateDomain(args.domain as string);
        const data = await client.callOrThrow("/api/allowed/list", params);
        return JSON.stringify(data, null, 2);
      },
    },
  • Input schema for dns_list_allowed. Defines a single optional string property 'domain' with description about drilling into subdomains.
    {
      definition: {
        name: "dns_list_allowed",
        description:
          "List allowed DNS zones (domains that bypass block lists). Returns a hierarchical tree — call with no domain to see top-level zones, then pass a domain (e.g. 'com') to drill into subdomains.",
        inputSchema: {
          type: "object",
          properties: {
            domain: {
              type: "string",
              description:
                "Optional parent domain to list children of (e.g. 'com' to see all allowed .com domains). Omit to see top-level zones.",
            },
          },
        },
      },
  • src/tools/index.ts:7-7 (registration)
    The blockingTools function is imported from './blocking.js' and registered in the getAllTools function at line 20 via spread operator.
    import { blockingTools } from "./blocking.js";
  • The MCP server's CallToolRequestSchema handler that looks up the tool by name in toolMap and invokes tool.handler(args), which is how dns_list_allowed gets executed at runtime.
    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 }],
        };
      } catch (error) {
        const rawMessage = error instanceof Error ? error.message : String(error);
        const message = sanitizeError(rawMessage);
    
        audit.logToolCall(
          name,
          (args || {}) as Record<string, unknown>,
          "error",
          Date.now() - startTime,
          message
        );
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({ error: message }),
            },
          ],
          isError: true,
        };
      }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • addedInput schema / properties / domain
      Added value: +{
      +  "description": "Optional parent domain to list children of (e.g. 'com' to see all allowed .com domains). Omit to see top-level zones.",
      +  "type": "string"
      +}
  2. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the return format (hierarchical tree) and the key behavior of using an optional domain to drill into subdomains. This goes beyond a simple 'list' and provides useful operational detail, though it doesn't mention permissions, errors, or side effects.

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 core purpose, then the hierarchical usage pattern. Every word adds value; no fluff or repetition.

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?

For a simple one-parameter tool with no output schema and no annotations, the description fully covers what the tool does, how to use it, and what it returns. It explains the hierarchical tree and the navigation process, making it complete for an agent to invoke 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 coverage is 100% and the parameter description in the schema already explains the optional domain parameter and the top-level behavior. The main description adds some context about the tree structure but is largely redundant with the schema, so it adds marginal value beyond the baseline.

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 lists allowed DNS zones (domains that bypass block lists), which is a specific verb+resource and distinguishes it from siblings like dns_list_blocked and dns_list_zones. It also describes the hierarchical tree behavior, making 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 Guidelines4/5

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

The description provides clear usage context by explaining how to navigate the tree: call with no domain for top-level zones, then pass a domain to drill down. It doesn't explicitly name alternatives or when-not-to-use, but the 'allowed' vs 'blocked' context makes the intended use obvious.

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