Skip to main content
Glama
rosschurchill

Technitium MCP Secure

dns_create_zone

Create a DNS zone for hosting records locally (Primary) or conditional forwarding (Forwarder).

Instructions

Create a new DNS zone. Use 'Primary' for hosting records locally, 'Forwarder' for conditional forwarding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zoneYesZone domain name (e.g. example.com)
typeNoZone type (default: Primary)

Implementation Reference

  • The handler function for dns_create_zone. Validates the domain name, optionally validates zone type (defaults to 'Primary'), and calls POST /api/zones/create on the Technitium server.
    handler: async (args) => {
      const zone = validateDomain(args.zone as string);
      const type = args.type
        ? validateZoneType(args.type as string)
        : "Primary";
      const data = await client.callOrThrow("/api/zones/create", {
        zone,
        type,
      });
      return JSON.stringify(data, null, 2);
    },
  • Input schema for dns_create_zone. Accepts 'zone' (string, required) and 'type' (enum: Primary/Secondary/Stub/Forwarder, optional).
    inputSchema: {
      type: "object",
      properties: {
        zone: {
          type: "string",
          description: "Zone domain name (e.g. example.com)",
        },
        type: {
          type: "string",
          enum: ["Primary", "Secondary", "Stub", "Forwarder"],
          description: "Zone type (default: Primary)",
        },
      },
      required: ["zone"],
    },
  • The zoneTools function is called inside getAllTools(), which collects all tool entries including dns_create_zone.
    export function getAllTools(client: TechnitiumClient): ToolEntry[] {
      return [
        ...dashboardTools(client),
        ...dnsClientTools(client),
        ...zoneTools(client),
  • src/index.ts:21-26 (registration)
    getAllTools() is invoked and tools are placed into toolMap for dispatch via CallToolRequestSchema handler.
    const allTools = getAllTools(client);
    
    // Filter out write tools in readonly mode
    const tools = config.readonly
      ? allTools.filter((t) => t.readonly)
      : allTools;
  • validateDomain() helper used by the handler to sanitize the zone domain name.
    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");
      }
      return trimmed;
    }
  • validateZoneType() helper used by the handler to validate the zone type parameter.
    export function validateZoneType(type: string): string {
      if (!VALID_ZONE_TYPES.has(type)) {
        throw new Error(`Invalid zone type: ${type}`);
      }
      return type;
    }
  • Rate limit registration for dns_create_zone — it gets 10 requests per 60s window (mutateLimits).
    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);

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior2/5

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

No annotations are present, so the description must carry the full behavioral disclosure burden. It only hints at parameter behavior ('Primary' vs 'Forwarder') and omits side effects, prerequisites, duplicate handling, or confirmation of what 'create' entails. The mutation is implied but not disclosed further.

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 action. The first sentence states the purpose; the second adds critical usage nuance. No filler or repetition.

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 create operation with two parameters and no output schema, the description plus schema is nearly sufficient. It explains the main action and clarifies the most important type choice. It could improve by mentioning behavior on duplicate zones or expected response, but overall it covers the essentials for a straightforward tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover both parameters (zone, type) at 100%, so baseline is 3. The description adds value by explaining the intended use of two enum values ('Primary' for local hosting, 'Forwarder' for conditional forwarding), which is beyond the schema's generic 'Zone type' description. It doesn't cover Secondary and Stub, but the additional context is meaningful.

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 opens with 'Create a new DNS zone,' a clear, specific verb+resource statement. It distinguishes this creation tool from sibling tools like dns_list_zones, dns_delete_zone, and dns_set_zone_options by focusing solely on the act of creating.

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 explicit guidance on choosing zone types, advising 'Primary' for local record hosting and 'Forwarder' for conditional forwarding. It does not mention when not to use the tool or name alternatives, but for a creation operation the context is clear.

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