Skip to main content
Glama
owine

UniFi Protect MCP

by owine

Get relay

protect_get_relay
Read-only

Fetch full details for a specific UniFi Protect relay by ID, including outputs, inputs, wireless signal, battery status, and LED settings to monitor or automate relay behavior.

Instructions

Get full details for a specific relay by ID. Returns: id, modelKey, name, mac, state, type, guid, ledSettings (isEnabled), outputs (array of objects: id, name, type, delay, pulseDuration, state, rebootState — id is the outputId for protect_activate_relay_output), inputs (array of objects: id, name, state, actionTrigger, actionType, actionOutputId), wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs).

Input Schema

NameRequiredDescriptionDefault
idYesRelay ID

Output 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 | ...
inputsNoInput channels (array of objects: id, name, state, actionTrigger, actionType, actionOutputId)
outputsNoOutput channels (array of objects: id, name, type, delay, pulseDuration, state, rebootState). `id` is the outputId for protect_activate_relay_output
modelKeyNoResource kind
ledSettingsNoLED settings (object: isEnabled)
wirelessConnectionStateNoWireless link state (object: signalState { signalQuality, signalStrength }, batteryStatus { percentage, isLow }, bridge)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.15.0
    • addedInput schema / properties / id / pattern
      Added value: +"^[A-Za-z0-9_-]{1,64}$"
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / inputs / description
      Previous value: -"Input channels (array of objects)"New value: +"Input channels (array of objects: id, name, state, actionTrigger, actionType, actionOutputId)"
    • changedOutput schema / properties / outputs / description
      Previous value: -"Output channels (array of objects)"New value: +"Output channels (array of objects: id, name, type, delay, pulseDuration, state, rebootState). `id` is the outputId for protect_activate_relay_output"
    • changedOutput schema / properties / wirelessConnectionState / description
      Previous value: -"Wireless link state (object)"New value: +"Wireless link state (object: signalState { signalQuality, signalStrength }, batteryStatus { percentage, isLow }, bridge)"
  2. Changed2 schema fields changedv2.13.0
    • 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"
      +  ]
      +}
  3. Changed8 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 / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / name / 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"
      +]
  4. Changed4 schema fields changedv2.7.5
    • addedOutput schema / properties / inputs
      Added value: +{
      +  "description": "Input channels (array of objects)"
      +}
    • addedOutput schema / properties / ledSettings
      Added value: +{
      +  "description": "LED settings (object: isEnabled)"
      +}
    • addedOutput schema / properties / outputs
      Added value: +{
      +  "description": "Output channels (array of objects)"
      +}
    • addedOutput schema / properties / wirelessConnectionState
      Added value: +{
      +  "description": "Wireless link state (object)"
      +}
  5. First observedv2.7.4

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint/openWorldHint, so the safety profile is covered. The description goes beyond that by detailing the returned structure and, notably, linking outputs[].id to protect_activate_relay_output's outputId parameter, which is genuinely useful cross-tool context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, which is good, but the bulk of the text enumerates the full return shape even though an output schema already exists, making much of it redundant. It is dense and structured but not every clause earns its place.

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?

For a simple read-only single-parameter tool with a full output schema and complete annotations, the description is more than sufficient and even adds the cross-tool outputId link. Only minor edges (e.g., not-found behavior) are absent, which is acceptable here.

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 description coverage is 100% for the single 'id' parameter, so the schema already documents it fully. The description's 'by ID' adds no format, source, or semantics beyond what the schema provides, warranting the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Get full details for a specific relay by ID'), which an agent can distinguish from the list-style sibling protect_list_relays. However, it never explicitly names or contrasts with that sibling, so differentiation is implicit rather than stated.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no prerequisites, and no exclusions or references to alternatives like protect_list_relays or protect_get_info. 'By ID' only weakly implies that an ID must already be known.

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