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
| Name | Required | Description | Default |
|---|---|---|---|
| mac | Yes | MAC address of the client to unblock |
Implementation Reference
- src/unifi_mcp/server.py:196-204 (handler)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.", ) ]
- src/unifi_mcp/server.py:74-87 (schema)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"], }, ),
- src/unifi_mcp/unifi_client.py:250-264 (handler)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
- src/unifi_mcp/server.py:148-149 (registration)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]:
- src/unifi_mcp/tools/clients.py:51-64 (schema)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"], }, ),