Skip to main content
Glama
rosschurchill

Technitium MCP Secure

dns_flush_cache

Flush the entire DNS cache to clear all stored records, forcing fresh resolution from upstream servers. Requires confirmation before executing.

Instructions

Flush the entire DNS cache. Forces all subsequent queries to be resolved fresh from upstream. Requires confirm=true to execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to confirm cache flush. Without this, returns a warning instead.

Implementation Reference

  • The handler function for the dns_flush_cache tool. Requires confirm=true to proceed, then calls the Technitium API /api/cache/flush endpoint to flush the DNS cache.
    handler: async (args) => {
      if (args.confirm !== true) {
        return JSON.stringify(
          {
            warning:
              "This will flush the entire DNS cache. All subsequent queries will be resolved fresh from upstream, which may temporarily increase latency. Set confirm=true to proceed.",
          },
          null,
          2
        );
      }
      const data = await client.callOrThrow("/api/cache/flush");
      return JSON.stringify(
        { success: true, message: "Cache flushed", ...data },
        null,
        2
      );
    },
  • The tool definition/schema including name, description, and inputSchema (confirm boolean).
    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.",
          },
        },
      },
    },
  • src/tools/cache.ts:5-5 (registration)
    The dns_flush_cache tool is registered as part of the cacheTools array export, which is imported by src/tools/index.ts (line 8) and aggregated into getAllTools() for the MCP server.
    export function cacheTools(client: TechnitiumClient): ToolEntry[] {
  • The helper method callOrThrow on TechnitiumClient used by the handler to make the /api/cache/flush API call.
    async callOrThrow(
      endpoint: string,
      params: Record<string, string> = {}
    ): Promise<Record<string, unknown>> {
      const result = await this.call(endpoint, params);
    
      if (result.status !== "ok") {
        throw new Error(
          result.errorMessage || `API error: ${result.status}`
        );
      }
    
      return result.response || {};
    }
  • Rate limiting registration: dns_flush_cache is configured with destructiveLimits (5 requests per 60 seconds) in the RateLimiter constructor.
    for (const tool of [
      "dns_delete_zone", "dns_delete_record", "dns_flush_cache",

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
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 the destructive nature ('flush the entire DNS cache'), the behavioral consequence ('forces all subsequent queries to be resolved fresh'), and a safety requirement ('Requires confirm=true to execute'). It does not mention permissions or reversibility, but these are less critical for a cache flush.

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, each earning its place. The first states the action and scope; the second explains the confirmation requirement and expected effect. Zero wasted words and the main verb is front-loaded.

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?

The tool is simple: one required-confirm parameter, no output schema, and a straightforward side effect. The description covers what it does, the scope, the consequence, and the confirmation requirement. It lacks mention of return values or potential side effects like temporary cache miss delays, but these are not essential for correct invocation.

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% coverage for the confirm parameter, explicitly describing that it must be true to confirm and that without it a warning is returned. The description's 'Requires confirm=true to execute' adds minor emphasis on execution but provides no substantial new meaning beyond the schema.

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 'Flush the entire DNS cache' uses a specific verb and resource, clearly distinguishing it from sibling tools like dns_flush_blocked, dns_flush_allowed, and dns_list_cache. It also communicates the full scope ('entire') and the purpose ('forces all subsequent queries to be resolved fresh').

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 the tool: when the entire DNS cache needs clearing and fresh resolution is desired. It provides clear context but does not explicitly mention alternatives or exclusions (e.g., use dns_delete_cached for per-record removal). This is strong implied guidance, though not as explicit as naming alternatives.

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