Skip to main content
Glama
coreyhines

coreyhines/opnsense-mcp

rmdns

Delete a specific DNS host override from Unbound by providing its UUID.

Instructions

Delete a DNS host override from Unbound

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the host override to delete (from dns output)

Implementation Reference

  • The RmdnsTool.execute() method deletes a DNS host override via the OPNsense API. It validates the uuid parameter, calls client.del_host_override(uuid), checks the result, and then calls client.reconfigure_unbound() to apply changes. Returns status 'success' with the uuid on success, or 'error' with details on failure.
    async def execute(self, params: dict[str, Any] | None = None) -> dict[str, Any]:
        """
        Delete a DNS host override by UUID and reload Unbound.
    
        Args:
            params: Dict with 'uuid' key.
    
        Returns:
            Dictionary containing the deleted UUID and status.
    
        """
        if params is None:
            params = {}
    
        if not self.client:
            return {"status": "error", "error": "No client available"}
    
        uuid = params.get("uuid", "").strip()
        if not uuid:
            return {"status": "error", "error": "uuid is required"}
    
        try:
            result = await self.client.del_host_override(uuid)
    
            if result.get("result") not in ("deleted", "ok", 1):
                return {
                    "status": "error",
                    "error": f"Delete failed: {result}",
                }
    
            await self.client.reconfigure_unbound()
    
            return {
                "uuid": uuid,
                "applied": True,
                "status": "success",
            }
        except Exception as e:
            logger.exception("Failed to delete DNS host override")
            return {"status": "error", "error": str(e)}
  • Input schema for the rmdns tool: requires a 'uuid' string property. Defined as class attribute input_schema on RmdnsTool.
    input_schema = {
        "type": "object",
        "properties": {
            "uuid": {
                "type": "string",
                "description": "UUID of the host override to delete (from dns tool output)",
            },
        },
        "required": ["uuid"],
    }
  • Import of RmdnsTool from opnsense_mcp.tools.rmdns into the server module.
    from opnsense_mcp.tools.rmdns import RmdnsTool
  • Type annotation in handle_message function: rmdns_tool parameter is typed as RmdnsTool.
    rmdns_tool: RmdnsTool,
  • Tool registration in the tools list: declares the rmdns tool with its name, description, and inputSchema for MCP capabilities.
    {
        "name": "rmdns",
        "description": "Delete a DNS host override from Unbound",
        "inputSchema": {
            "type": "object",
            "properties": {
                "uuid": {
                    "type": "string",
                    "description": (
                        "UUID of the host override to delete (from dns output)"
                    ),
                },
            },
            "required": ["uuid"],
        },
    },
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It merely states 'delete' without disclosing side effects, prerequisites (UUID must exist), or whether the deletion is permanent. This is insufficient for understanding implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence. For a tool with one parameter, this is efficient. However, a brief addition like 'requires UUID from dns output' would improve without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given low complexity (1 param, no output schema), the description provides the core action. However, it omits that the UUID must come from dns output and does not describe return values or confirmation feedback, leaving gaps for the agent.

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?

Schema coverage is 100%, so the parameter uuid is fully documented. The tool description adds no extra meaning beyond the schema, meeting the baseline. No parameter details in the description itself.

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 'Delete a DNS host override from Unbound', specifying the action (delete) and the resource (DNS host override). It distinguishes from sibling tools like mkdns (create) and dns (list).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when needing to remove a host override but provides no explicit when-to-use, when-not-to-use, or comparison with alternatives. The parameter description hints at obtaining UUID from dns output, but the tool description itself lacks context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/coreyhines/opnsense-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server