Skip to main content
Glama
nntkio

UniFi MCP Server

by nntkio

unblock_client

Unblock a previously blocked client device on a UniFi network by providing its MAC address to restore network access.

Instructions

Unblock a previously blocked client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macYesMAC address of the client to unblock

Implementation Reference

  • MCP tool handler for 'unblock_client': extracts MAC from arguments, calls UniFiClient.unblock_client(mac), and returns success message.
    case "unblock_client":
        mac = arguments.get("mac", "")
        await client.unblock_client(mac)
        return [
            TextContent(
                type="text",
                text=f"Client {mac} has been unblocked.",
            )
        ]
  • Input schema definition for the unblock_client tool, specifying required 'mac' parameter.
    Tool(
        name="unblock_client",
        description="Unblock a previously blocked client",
        inputSchema={
            "type": "object",
            "properties": {
                "mac": {
                    "type": "string",
                    "description": "MAC address of the client to unblock",
                }
            },
            "required": ["mac"],
        },
    ),
  • Low-level UniFiClient method implementing unblock_client by sending 'unblock-sta' API command to the controller.
    async def unblock_client(self, mac: str) -> bool:
        """Unblock a client from the network.
    
        Args:
            mac: Client MAC address.
    
        Returns:
            True if unblock command was sent successfully.
        """
        await self._request(
            "POST",
            "/api/s/{site}/cmd/stamgr",
            json={"cmd": "unblock-sta", "mac": mac.lower()},
        )
        return True
  • Registers the central tool dispatcher @server.call_tool() which matches on tool name 'unblock_client' to invoke the handler.
    @server.call_tool()
    async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
  • Alternative schema definition in clients.py module (potentially unused).
    Tool(
        name="unblock_client",
        description="Unblock a previously blocked client",
        inputSchema={
            "type": "object",
            "properties": {
                "mac": {
                    "type": "string",
                    "description": "MAC address of the client to unblock",
                }
            },
            "required": ["mac"],
        },
    ),
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'unblock' implies a state change operation, the description doesn't specify whether this requires admin permissions, whether it's reversible, what happens to the client's network access, or if there are rate limits. It provides minimal behavioral context beyond the basic action.

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, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple operation and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

For a state-changing tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'unblocking' entails operationally, what permissions are required, what the expected outcome is, or how to verify success. Given the complexity of network management operations, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, with the single parameter 'mac' clearly documented as 'MAC address of the client to unblock.' The description doesn't add parameter details beyond what the schema provides, but with only one well-documented parameter and high schema coverage, the baseline is appropriately high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('unblock') and target ('a previously blocked client'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'block_client' beyond the opposite action, missing an opportunity to clarify the relationship between blocking and unblocking operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., the client must already be blocked), when unblocking is appropriate, or how this differs from other client management tools like 'disconnect_client' or 'restart_device'.

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/nntkio/unifiMCP'

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