Skip to main content
Glama
owine

UniFi Protect MCP

by owine

protect_subscribe_devices

Read-only

Listen to UniFi Protect device update WebSocket messages for 1-30 seconds to detect changes like recording status flips, battery drops, or new device adoption. Returns only changed device fields.

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
errorNoConnection error, if any
durationNoActual listen duration in seconds (number)
messagesNoCaptured WebSocket messages (add/update/remove or event envelopes)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.11.5
    • removedOutput schema / properties / error / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / error / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. First observedv2.7.4

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare it a safe read (readOnlyHint=true, destructiveHint=false), and the description adds real behavioral context: the listen window (1-30s) and the key trait that only changed fields are delivered, not the full object. It stops short of mention of dropped connections or reconnection behavior, but adds genuine value over the annotations.

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-loads the core action and return shape, then the use case. It is dense but every sentence carries information; only the return-shape detail is partly redundant given an output schema exists.

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

Completeness4/5

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

Covers the action, duration constraint, return shape, and use case, which is enough to invoke it. Missing only differentiation from the sibling protect_subscribe_events, the closest alternative for an agent deciding between streaming tools.

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?

Only one parameter, and schema coverage is 100% with the same 1-30s/default-5 detail already in the schema. The description's duration mention adds no meaning beyond the schema, so the baseline of 3 applies.

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?

States a specific verb (subscribe/connect) and resource (device update WebSocket), and the exact operation (collect messages for 1-30s). It is clearly distinguishable from the sibling list_* and get_* tools, which are one-shot reads.

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?

Gives clear usage context ('use to detect state changes like isRecording flipping, battery drops, or new devices being adopted'). However, it never contrasts with the sibling protect_subscribe_events or states when a polling read (protect_list_cameras) is preferable, so no explicit alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.