opnsense_dns_delete_override
Delete a DNS host override by UUID to remove custom DNS entries. Apply changes with the activate command.
Instructions
Delete a DNS host override by UUID. Run opnsense_dns_apply afterwards to activate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | UUID of the host override to delete |
Implementation Reference
- src/tools/dns.ts:313-317 (handler)The handler function that executes the 'opnsense_dns_delete_override' tool. It parses the UUID from args using DeleteOverrideSchema, then sends a DELETE request to the OPNsense API endpoint /unbound/settings/delHostOverride/{uuid}.
case "opnsense_dns_delete_override": { const { uuid } = DeleteOverrideSchema.parse(args); const result = await client.post(`/unbound/settings/delHostOverride/${uuid}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/dns.ts:17-19 (schema)Zod schema for input validation of the delete override tool. Expects a single 'uuid' field validated by UuidSchema (UUID format).
const DeleteOverrideSchema = z.object({ uuid: UuidSchema, }); - src/utils/validation.ts:3-5 (schema)The UuidSchema helper used by DeleteOverrideSchema to validate UUID format.
export const UuidSchema = z .string() .uuid("Invalid UUID format"); - src/tools/dns.ts:104-115 (registration)Tool definition registration in the dnsToolDefinitions array. Declares the tool name, description, and JSON input schema for the MCP ListTools response.
{ name: "opnsense_dns_delete_override", description: "Delete a DNS host override by UUID. Run opnsense_dns_apply afterwards to activate.", inputSchema: { type: "object" as const, properties: { uuid: { type: "string", description: "UUID of the host override to delete" }, }, required: ["uuid"], }, }, - src/index.ts:59-59 (registration)Registration of the DNS tool handler in the MCP server's tool handler map. Maps each DNS tool definition name to the handleDnsTool function.
for (const def of dnsToolDefinitions) toolHandlers.set(def.name, handleDnsTool);