Skip to main content
Glama
owine

UniFi Protect MCP

by owine

protect_get_sensor

Read-only

Retrieve complete details for a UniFi Protect sensor by ID, including battery status, motion, temperature, humidity, light, leak, and tampering state. Returns all settings and event timestamps in one response.

Instructions

Get full details for a specific sensor by ID. Returns: id, modelKey, name, mac, state, mountType, batteryStatus (percentage, isLow), stats (light, humidity, temperature), lightSettings, humiditySettings, temperatureSettings, isOpened, openStatusChangedAt, isMotionDetected, motionDetectedAt, motionSettings, glassBreakSettings, scheduleMode, armProfileIds, hasCustomSensitivityWhenArmed, alarmTriggeredAt, alarmSettings, leakDetectedAt, externalLeakDetectedAt, leakSettings, tamperingDetectedAt, wirelessConnectionState (7.1.83 docs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSensor ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDevice ID
macNoMAC address
nameNoDevice name
stateNoCONNECTED | DISCONNECTED | ...
statsNoEnvironmental stats (object: light, humidity, temperature)
isOpenedNoOpen/close contact state (boolean)
modelKeyNoResource kind
mountTypeNoMount type, e.g. "door", "leak", "garage"
leakSettingsNoLeak detection settings (object)
scheduleModeNoSchedule mode: "always" | "when_armed"
alarmSettingsNoAlarm settings (object: isEnabled)
armProfileIdsNoArm profile IDs this sensor belongs to (array of strings)
batteryStatusNoBattery status (object: percentage, isLow)
lightSettingsNoLight threshold settings (object)
leakDetectedAtNoLast leak timestamp in epoch ms (number)
motionSettingsNoMotion detection settings (object)
alarmTriggeredAtNoLast alarm timestamp in epoch ms (number)
humiditySettingsNoHumidity threshold settings (object)
isMotionDetectedNoMotion currently detected (boolean)
motionDetectedAtNoLast motion timestamp in epoch ms (number)
glassBreakSettingsNoGlass-break detection settings (object)
openStatusChangedAtNoOpen-status change timestamp in epoch ms (number)
tamperingDetectedAtNoLast tampering timestamp in epoch ms (number)
temperatureSettingsNoTemperature threshold settings (object)
externalLeakDetectedAtNoLast external-leak timestamp in epoch ms (number)
wirelessConnectionStateNoWireless link state (object: signalState, batteryStatus, bridge)
hasCustomSensitivityWhenArmedNoCustom armed sensitivity enabled (boolean)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed22 schema fields changedv2.7.5
    • addedOutput schema / properties / alarmSettings
      Added value: +{
      +  "description": "Alarm settings (object: isEnabled)"
      +}
    • addedOutput schema / properties / alarmTriggeredAt
      Added value: +{
      +  "description": "Last alarm timestamp in epoch ms (number)"
      +}
    • addedOutput schema / properties / armProfileIds
      Added value: +{
      +  "description": "Arm profile IDs this sensor belongs to (array of strings)"
      +}
    • addedOutput schema / properties / batteryStatus
      Added value: +{
      +  "description": "Battery status (object: percentage, isLow)"
      +}
    • addedOutput schema / properties / externalLeakDetectedAt
      Added value: +{
      +  "description": "Last external-leak timestamp in epoch ms (number)"
      +}
    • addedOutput schema / properties / glassBreakSettings
      Added value: +{
      +  "description": "Glass-break detection settings (object)"
      +}
    • addedOutput schema / properties / hasCustomSensitivityWhenArmed
      Added value: +{
      +  "description": "Custom armed sensitivity enabled (boolean)"
      +}
    • addedOutput schema / properties / humiditySettings
      Added value: +{
      +  "description": "Humidity threshold settings (object)"
      +}
    • addedOutput schema / properties / isMotionDetected
      Added value: +{
      +  "description": "Motion currently detected (boolean)"
      +}
    • addedOutput schema / properties / isOpened
      Added value: +{
      +  "description": "Open/close contact state (boolean)"
      +}
    • addedOutput schema / properties / leakDetectedAt
      Added value: +{
      +  "description": "Last leak timestamp in epoch ms (number)"
      +}
    • addedOutput schema / properties / leakSettings
      Added value: +{
      +  "description": "Leak detection settings (object)"
      +}
    • addedOutput schema / properties / lightSettings
      Added value: +{
      +  "description": "Light threshold settings (object)"
      +}
    • addedOutput schema / properties / motionDetectedAt
      Added value: +{
      +  "description": "Last motion timestamp in epoch ms (number)"
      +}
    • addedOutput schema / properties / motionSettings
      Added value: +{
      +  "description": "Motion detection settings (object)"
      +}
    • addedOutput schema / properties / mountType
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Mount type, e.g. \"door\", \"leak\", \"garage\""
      +}
    • addedOutput schema / properties / openStatusChangedAt
      Added value: +{
      +  "description": "Open-status change timestamp in epoch ms (number)"
      +}
    • addedOutput schema / properties / scheduleMode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Schedule mode: \"always\" | \"when_armed\""
      +}
    • addedOutput schema / properties / stats
      Added value: +{
      +  "description": "Environmental stats (object: light, humidity, temperature)"
      +}
    • addedOutput schema / properties / tamperingDetectedAt
      Added value: +{
      +  "description": "Last tampering timestamp in epoch ms (number)"
      +}
    • addedOutput schema / properties / temperatureSettings
      Added value: +{
      +  "description": "Temperature threshold settings (object)"
      +}
    • addedOutput schema / properties / wirelessConnectionState
      Added value: +{
      +  "description": "Wireless link state (object: signalState, batteryStatus, bridge)"
      +}
  2. First observedv2.7.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate read-only and non-destructive behavior. The description adds value by enumerating the return fields, clarifying what data to expect. However, it does not discuss error handling or edge cases.

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?

The description is compact but front-loads the purpose. The long list of return fields reduces conciseness slightly but is necessary for completeness.

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 a single required parameter and the presence of an output schema, the description fully covers the tool's behavior by listing all return fields. No gaps remain for a simple get-by-ID operation.

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?

The input schema fully covers the single parameter 'id' with description 'Sensor ID'. The tool description does not add further meaning beyond the schema, meeting the baseline for 100% coverage.

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?

The description clearly states the tool retrieves full details for a specific sensor by ID, with a precise verb ('Get') and resource ('sensor'). It distinguishes from sibling tools like protect_get_camera by focusing on sensors.

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 does not explicitly state when to use this tool versus alternatives, such as protect_list_sensors for listing. Usage is implied but lacks guidance on context or exclusions.

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

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