Skip to main content
Glama
rosschurchill

Technitium MCP Secure

dns_delete_cached

Remove a specific domain from the DNS cache to clear stale entries without affecting other cached domains.

Instructions

Delete a specific domain from the DNS cache. Unlike flush, this only removes the specified domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to delete from cache (e.g. example.com)

Implementation Reference

  • Handler for dns_delete_cached: validates domain input, calls /api/cache/delete endpoint on the Technitium DNS server, and returns success response with the deleted domain.
    {
      definition: {
        name: "dns_delete_cached",
        description:
          "Delete a specific domain from the DNS cache. Unlike flush, this only removes the specified domain.",
        inputSchema: {
          type: "object",
          properties: {
            domain: {
              type: "string",
              description: "Domain name to delete from cache (e.g. example.com)",
            },
          },
          required: ["domain"],
        },
      },
      readonly: false,
      handler: async (args) => {
        const domain = validateDomain(args.domain as string);
        const data = await client.callOrThrow("/api/cache/delete", { domain });
        return JSON.stringify(
          { success: true, deleted: domain, ...data },
          null,
          2
        );
      },
    },
  • Input schema for dns_delete_cached: requires a 'domain' string parameter describing the domain to remove from the DNS cache.
    definition: {
      name: "dns_delete_cached",
      description:
        "Delete a specific domain from the DNS cache. Unlike flush, this only removes the specified domain.",
      inputSchema: {
        type: "object",
        properties: {
          domain: {
            type: "string",
            description: "Domain name to delete from cache (e.g. example.com)",
          },
        },
        required: ["domain"],
      },
    },
  • The cacheTools() function in cache.ts registers the dns_delete_cached tool as part of the array of cache-related tools, which are then collected by getAllTools() in index.ts.
    export function cacheTools(client: TechnitiumClient): ToolEntry[] {
      return [
        {
          definition: {
            name: "dns_flush_cache",
            description:
              "Flush the entire DNS cache. Forces all subsequent queries to be resolved fresh from upstream. Requires confirm=true to execute.",
            inputSchema: {
              type: "object",
              properties: {
                confirm: {
                  type: "boolean",
                  description:
                    "Must be true to confirm cache flush. Without this, returns a warning instead.",
                },
              },
            },
  • getAllTools() aggregates all tool arrays including cacheTools (which contains dns_delete_cached) and exposes them to the MCP server.
    export function getAllTools(client: TechnitiumClient): ToolEntry[] {
      return [
        ...dashboardTools(client),
        ...dnsClientTools(client),
        ...zoneTools(client),
        ...recordTools(client),
        ...blockingTools(client),
        ...cacheTools(client),
        ...settingsTools(client),
        ...logTools(client),
        ...appTools(client),
        ...dnssecTools(client),
      ];
    }
  • Helper function validateDomain() used by dns_delete_cached to validate and sanitize the domain input before making the API call.
    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;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the action is targeted (removes only the specified domain) and not a full flush, which adds valuable context. However, it does not mention potential side effects (e.g., whether the cache repopulates, error behavior for nonexistent domains) or authorization requirements. For a simple delete operation this is acceptable but 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 a single sentence that is both concise and information-dense. It states the core purpose and the key differentiator without any redundant words. The structure is front-loaded with the action.

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), the description is mostly complete. It covers the operation and the distinction from flush. However, it could briefly mention what happens when the domain isn't cached or confirm that the action is immediate, which would improve completeness. Still, it's a well-specified tool relative to its complexity.

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 input schema has 100% description coverage for the single 'domain' parameter, fully documenting its type and example. The description adds no extra parameter semantics beyond what the schema already provides, so the baseline score of 3 applies.

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: 'Delete a specific domain from the DNS cache' with a specific verb and resource. It also distinguishes itself from a sibling tool by explicitly referencing 'flush' and noting that it only removes the specified domain, which differentiates it from dns_flush_cache.

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 implies when to use this tool by contrasting it with flush: use this for a single domain removal rather than clearing the entire cache. It clearly names the alternative (flush) and the distinguishing condition, though it doesn't provide explicit 'when not to use' beyond that.

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