opnsense_dns_flush_cache
Clears the Unbound DNS resolver cache to resolve domain name resolution issues.
Instructions
Flush the Unbound DNS resolver cache
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "opnsense_dns_flush_cache"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/dns.ts:374-377 (handler)The handler case that executes the DNS flush cache logic. It calls client.post('/unbound/service/flushcache') to flush the Unbound DNS resolver cache.
case "opnsense_dns_flush_cache": { const result = await client.post("/unbound/service/flushcache"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/dns.ts:184-188 (registration)The tool registration/definition that declares the 'opnsense_dns_flush_cache' tool with its name, description, and empty input schema.
{ name: "opnsense_dns_flush_cache", description: "Flush the Unbound DNS resolver cache", inputSchema: { type: "object" as const, properties: {} }, }, - src/index.ts:59-70 (registration)The tool handler is registered in the toolHandlers map for all DNS tools, including opnsense_dns_flush_cache.
for (const def of dnsToolDefinitions) toolHandlers.set(def.name, handleDnsTool); for (const def of firewallToolDefinitions) toolHandlers.set(def.name, handleFirewallTool); for (const def of diagnosticsToolDefinitions) toolHandlers.set(def.name, handleDiagnosticsTool); for (const def of interfacesToolDefinitions) toolHandlers.set(def.name, handleInterfacesTool); for (const def of dhcpToolDefinitions) toolHandlers.set(def.name, handleDhcpTool); for (const def of systemToolDefinitions) toolHandlers.set(def.name, handleSystemTool); for (const def of acmeToolDefinitions) toolHandlers.set(def.name, handleAcmeTool); for (const def of firmwareToolDefinitions) toolHandlers.set(def.name, handleFirmwareTool); for (const def of routingToolDefinitions) toolHandlers.set(def.name, handleRoutingTool); for (const def of vlanToolDefinitions) toolHandlers.set(def.name, handleVlanTool); for (const def of tailscaleToolDefinitions) toolHandlers.set(def.name, handleTailscaleTool); for (const def of natToolDefinitions) toolHandlers.set(def.name, handleNatTool);