Skip to main content
Glama
owine

UniFi Protect MCP

by owine

protect_subscribe_devices

Read-only

Monitor UniFi Protect device state changes by subscribing to the update WebSocket. Collect messages for 1-30 seconds to detect adds, updates, and removals of cameras, lights, and sensors.

Instructions

Connect to the device update WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?}; each message has {type: 'add'|'update'|'remove', modelKey: 'camera'|'light'|'sensor'|..., id, payload: partial device fields that changed}. Use to detect state changes like isRecording flipping, battery drops, or new devices being adopted — fields delivered are only those that changed, not the full device object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
durationNoSeconds to listen (1-30, default 5)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesNoCaptured WebSocket messages (add/update/remove or event envelopes)
durationNoActual listen duration in seconds (number)
errorNoConnection error, if any
Behavior4/5

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

Adds details beyond annotations: WebSocket connection, duration collection, partial updates only (changed fields), and potential error. Annotations already indicate read-only and non-destructive, so description supplements well.

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?

Front-loaded with core action, then return structure, examples, and behavioral note. Every sentence adds value; no fluff.

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

Completeness5/5

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

Given the tool's complexity (WebSocket, time-bound subscription, partial updates), the description covers the return format, message structure, field change semantics, and usage context. Output schema exists but description still provides key behavioral info.

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?

Single parameter 'duration' with schema description already covering defaults and range. Description reiterates 'specified duration (1-30s)' but adds no new semantic value beyond schema.

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?

Clearly describes connecting to a WebSocket to collect device update messages for a specified duration. Specifies return structure and message content, distinguishing from sibling 'get'/'list' tools and the broader 'protect_subscribe_events'.

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

Usage Guidelines4/5

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

Provides specific use cases like detecting state changes (isRecording flipping, battery drops, new devices). Does not explicitly mention when not to use, but the examples give strong guidance.

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/owine/unifi-protect-mcp'

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