unblock_client
Unblock a client from the UniFi network to restore internet access after being blocked by network policies or security measures.
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": "unblock_client"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/clients.js:85-90 (handler)The primary handler for the 'unblock_client' MCP tool. It invokes the UniFi API via unifi.unblockClient, handles the response, and returns formatted text output.
handler: async ({ hostId, siteId, mac }) => { const result = await unifi.unblockClient(hostId, siteId, mac); return { content: [{ type: 'text', text: `Client ${mac} has been unblocked. ${JSON.stringify(result, null, 2)}` }] }; } - src/tools/clients.js:80-84 (schema)Zod schema defining input parameters for the unblock_client tool: hostId, siteId, and mac address.
schema: z.object({ hostId: z.string().describe('The host ID'), siteId: z.string().describe('The site ID'), mac: z.string().describe('The client MAC address') }), - src/server.js:30-30 (registration)Registration of the clientTools module (containing unblock_client) to the MCP server via registerToolsFromModule, which calls server.tool() for each tool.
registerToolsFromModule(clientTools); - src/unifi-client.js:161-164 (helper)Underlying helper function that makes the actual POST request to the UniFi Cloud API to unblock the client.
export async function unblockClient(hostId, siteId, mac) { const response = await cloudApi.post(`/v1/hosts/${hostId}/sites/${siteId}/clients/${mac}/unblock`); return response.data; } - src/server.js:4-4 (registration)Import of the clientTools module, which includes the unblock_client tool definition.
import { clientTools } from './tools/clients.js';