Skip to main content
Glama
owine

UniFi Protect MCP

by owine

protect_get_sensor

Read-only

Retrieve complete sensor details by ID, including status, battery, motion, and environmental readings.

Instructions

Get full details for a specific sensor by ID. Returns: id, modelKey, name, mac, state, type, guid, mountType, featureFlags (temperature, humidity, light, motion, waterLeak, open, tamper, smoke — each {channelCount}), 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.3.47 docs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSensor ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDevice ID
macNoMAC address
guidNoHardware MODEL GUID, shared by every unit of the same model. NOT a per-device identifier — use `id` to identify a device.
nameNoDevice name
typeNoHardware model name, e.g. "UVC G6 Turret", "UP Chime PoE", "UNVR-PRO"
stateNoCONNECTED | DISCONNECTED | ...
statsNoEnvironmental stats (object: light, humidity, temperature)
isOpenedNoOpen/close contact state (boolean)
modelKeyNoResource kind
mountTypeNoMount type, e.g. "door", "leak", "garage"
featureFlagsNoSensor capability flags, added in 7.3.x (object: temperature, humidity, light, motion, waterLeak, open, tamper, smoke — each { channelCount })
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.

  1. Changed3 schema fields changedv2.13.0
    • addedOutput schema / properties / featureFlags
      Added value: +{
      +  "description": "Sensor capability flags, added in 7.3.x (object: temperature, humidity, light, motion, waterLeak, open, tamper, smoke — each { channelCount })"
      +}
    • addedOutput schema / properties / guid
      Added value: +{
      +  "description": "Hardware MODEL GUID, shared by every unit of the same model. NOT a per-device identifier — use `id` to identify a device.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / type
      Added value: +{
      +  "description": "Hardware model name, e.g. \"UVC G6 Turret\", \"UP Chime PoE\", \"UNVR-PRO\"",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed12 schema fields changedv2.11.5
    • removedOutput schema / properties / mac / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / mac / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / modelKey / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / modelKey / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / mountType / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / mountType / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / scheduleMode / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / scheduleMode / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / state / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / state / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. 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)"
      +}
  4. 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 readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description goes beyond annotations by enumerating the exact fields returned, which is valuable behavioral context. It also notes the wirelessConnectionState field is from version 7.3.47 docs, adding version-specific transparency. This does not contradict any 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?

The description front-loads the purpose in the first sentence, then provides a comprehensive but structured list of return fields. It is lengthy, but each item adds value by informing the agent what data is available. The trailing note about '(7.3.47 docs)' is slightly ambiguous but not wasteful. Overall, it is well-organized and not repetitive.

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?

With an output schema present, the description doesn't need to explain return values, yet it does, which is a bonus. It covers the single parameter fully via the schema and provides a thorough field list. The version note adds nuance. Nothing critical is missing for an agent to call this tool correctly, though it could explicitly mention it's for sensors only, which is already implied.

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?

There is only one parameter, id, which the schema already describes as 'Sensor ID' (100% coverage). The description adds no additional meaning about the parameter itself, but the schema fully covers it. Baseline 3 is appropriate since the schema does the heavy lifting and the description focuses on the response rather than the input.

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 verb and resource: 'Get full details for a specific sensor by ID.' This distinguishes it from list_sensors (which lists) and other get tools for different resources (camera, light, etc.). The resource is explicit, so an agent can immediately identify this as the per-sensor retrieval tool.

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?

The description does not explicitly mention when to use this versus alternatives, but it clearly implies usage: when you need full details for one specific sensor, not a list. The sibling list shows other get tools for other resources, so the context is clear. It doesn't provide exclusions or alternatives, but the purpose is unambiguous enough that an agent would know to use this for a sensor ID.

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