get_door
Retrieve access door information from UniFi network infrastructure to monitor and manage entry points through the Cloud API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/access.js:28-33 (handler)Handler function for the 'get_door' tool that retrieves specific door details from the UniFi API and returns formatted JSON response.handler: async ({ hostId, doorId }) => { const door = await unifi.getDoor(hostId, doorId); return { content: [{ type: 'text', text: JSON.stringify(door, null, 2) }] }; }
- src/tools/access.js:24-27 (schema)Zod schema defining input parameters for the 'get_door' tool: hostId and doorId.schema: z.object({ hostId: z.string().describe('The host ID'), doorId: z.string().describe('The door ID') }),
- src/server.js:32-32 (registration)Registers the accessTools module, which includes the 'get_door' tool, with the MCP server using registerToolsFromModule.registerToolsFromModule(accessTools);
- src/unifi-client.js:261-264 (helper)Helper function getDoor that makes the API call to retrieve door details from UniFi Cloud API, called by the tool handler.export async function getDoor(hostId, doorId) { const response = await cloudApi.get(`/v1/hosts/${hostId}/doors/${doorId}`); return response.data; }