Skip to main content
Glama
owine

UniFi Protect MCP

by owine

protect_subscribe_events

Read-only

Collect real-time UniFi Protect events by listening to the WebSocket for up to 30 seconds, returning motion, ring, smart detection, sensor alerts, and metadata like license plates or NFC IDs.

Instructions

Connect to the Protect event WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?}; each event message includes: id, type ('motion' | 'ring' | 'smartDetectZone' | 'smartDetectLine' | 'sensorMotion' | 'sensorAlarm' | 'fingerprint' | 'nfcCard' | ...), start, end (null while ongoing), camera/sensor id, score, smartDetectTypes (['person','vehicle','animal','package','license_plate','face']), metadata (e.g. detected license plate text, NFC card id, fingerprint id, ULP user match).

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

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true/destructiveHint=false, so the safety profile is covered. The description adds substantial behavioral context beyond annotations: the duration range (1-30s), that events arrive as a stream, the ongoing-event semantics (end=null), and the full shape of returned event messages including optional error field.

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?

A single dense sentence front-loads the connect-and-collect behavior, then enumerates return shape. It is long but information-dense with little filler; the enum listings are the bulk but arguably useful.

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?

An output schema exists, so return-value explanation is optional—yet the description complements it with concrete event field semantics (type enum, smartDetectTypes, metadata examples) that help the agent interpret results. Only minor gap is the absence of explicit when-to-use guidance versus sibling 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?

Schema coverage is 100% and the single 'duration' parameter is fully documented in both schema and description (1-30s, default 5). The description adds no syntax or format beyond what the schema provides, so baseline 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 ('Connect... and collect messages') and resource ('Protect event WebSocket'), and the name/title align. Clearly distinct from sibling list/get tools, which are request-response, whereas this is a streaming/collection operation.

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

Usage Guidelines3/5

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

The description implies usage context (listening for live events over a duration) but never explicitly states when to use this tool versus alternatives like protect_list_cameras or protect_subscribe_devices. No exclusions or routing guidance are provided.

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