Skip to main content
Glama
owine

UniFi Protect MCP

by owine

List relays

protect_list_relays
Read-only

List all relays managed by UniFi Protect. Returns array with details like id, name, state, outputs, inputs, and supports paging with limit and offset.

Instructions

List all relays managed by UniFi Protect. Returns array; each relay includes: 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). On a large site, use limit and offset to page; a paged result also returns totalCount and offset.

Input Schema

NameRequiredDescriptionDefault
limitNoReturn at most this many items
offsetNoSkip this many items first (default 0)

Output Schema

NameRequiredDescriptionDefault
offsetNoPaged results only: the index of the first item returned
resultYesArray of items returned by the list endpoint
totalCountNoPaged results only: the number of items in the whole list

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv2.15.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Return at most this many items",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Skip this many items first (default 0)",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Paged results only: the index of the first item returned",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / result / items / 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 / result / items / 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 / result / items / properties / wirelessConnectionState / description
      Previous value: -"Wireless link state (object)"New value: +"Wireless link state (object: signalState { signalQuality, signalStrength }, batteryStatus { percentage, isLow }, bridge)"
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Paged results only: the number of items in the whole list",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  2. Changed2 schema fields changedv2.13.0
    • addedOutput schema / properties / result / items / 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 / result / items / 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 / result / items / properties / mac / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / result / items / properties / mac / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / result / items / properties / modelKey / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / result / items / properties / modelKey / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / result / items / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / result / items / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / result / items / properties / state / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / result / items / properties / state / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  4. Changed4 schema fields changedv2.7.5
    • addedOutput schema / properties / result / items / properties / inputs
      Added value: +{
      +  "description": "Input channels (array of objects)"
      +}
    • addedOutput schema / properties / result / items / properties / ledSettings
      Added value: +{
      +  "description": "LED settings (object: isEnabled)"
      +}
    • addedOutput schema / properties / result / items / properties / outputs
      Added value: +{
      +  "description": "Output channels (array of objects)"
      +}
    • addedOutput schema / properties / result / items / properties / wirelessConnectionState
      Added value: +{
      +  "description": "Wireless link state (object)"
      +}
  5. First observedv2.7.4

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is fully covered. The description adds the useful cross-reference that an output's id is the outputId for protect_activate_relay_output, but the bulk of the text enumerates return fields rather than behavioral traits.

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, but the body is a dense run-on enumerating every nested field of the relay object. Since an output schema already exists, this field-by-field listing largely repeats structured data and hurts readability without adding proportionate value.

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 list tool with a full output schema, annotations, and 100% schema coverage, the description is more than adequate and even documents return structure beyond requirements. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are documented, so the baseline is 3. The description goes beyond the schema by explaining how limit/offset behave together (paging) and that a paged response includes totalCount and offset, which the schema does not state.

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 and resource ('List all relays managed by UniFi Protect'), which cleanly separates it from the singular protect_get_relay sibling. The scope ('all relays managed by') is explicit, so an agent knows exactly what universe is returned.

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 a concrete operational condition ('On a large site, use limit and offset to page') and explains what a paged result returns. It stops short of naming alternatives (protect_get_relay / protect_subscribe_devices), so it is clear context rather than full when/when-not guidance.

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