Skip to main content
Glama

UniFi Protect: Request

unifi_protect_request
Read-only

Call any private UniFi Protect API endpoint directly to reach replacement endpoints when wrapped tools return 404; returns raw GET responses from /proxy/protect/api and blocks writes by default.

Instructions

Escape hatch: call any private Protect API endpoint directly, relative to /proxy/protect/api. This exists because the private API is undocumented and Ubiquiti moves endpoints between Protect releases — when a wrapped tool starts returning 404, this reaches the replacement without waiting for a new version of this server. Responses are returned RAW and unshaped, so a broad endpoint like bootstrap can return hundreds of kilobytes; prefer the wrapped tools, which summarize. Writes are DISABLED: only GET is permitted. Set UNIFI_PROTECT_ALLOW_WRITES=1 to allow mutations.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "unifi_protect_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoJSON request body, for POST and PATCH.
pathYesPath relative to /proxy/protect/api, without a leading slash, e.g. "cameras", "nvr", "events/abc123". Not an absolute URL.
queryNoQuery parameters as a flat string map, e.g. {"start":"1756500000000"}. Remember that Protect times are milliseconds since the epoch.
methodNoHTTP method.GET

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint=false, and the description reinforces that with 'Writes are DISABLED: only GET is permitted' plus the env-var override. It also discloses the most important non-obvious behavior: responses are RAW and unshaped, so broad endpoints like `bootstrap` return hundreds of kilobytes. Minor gap: the mention of UNIFI_PROTECT_ALLOW_WRITES=1 enabling mutations sits awkwardly against a schema whose method enum only accepts GET, though it does not contradict the annotations.

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

Conciseness5/5

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

Front-loads the escape-hatch framing, then justifies it (undocumented API, endpoints move between releases), then gives the operational caveats. No sentence is redundant; the size warning and write restriction each carry distinct information.

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?

For a raw passthrough tool with no output schema, the description covers everything an agent needs: the base path, that responses are unshaped and potentially large, that only GET works, and when to use a wrapped tool instead. Nothing material is missing.

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%, so path, query, body and method are already documented with examples and the millisecond-epoch note. The description adds no additional parameter meaning beyond what the schema states, so the 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 (call directly) and resource (any private Protect API endpoint relative to /proxy/protect/api), and frames its role as an escape hatch distinct from the wrapped siblings. An agent can tell immediately that this is the raw passthrough and not one of the list_/get_ tools.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('when a wrapped tool starts returning 404'), an explicit preference ('prefer the wrapped tools, which summarize'), and an explicit restriction ('only GET is permitted'). This is the when/when-not/alternative triad in full.

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