Skip to main content
Glama
mcp-unifi-network
by mgcrea

UniFi: Request

unifi_request
Read-only

Call any UniFi Integration API endpoint directly to handle unwrapped resources like VPNs, ACL rules, and DPI tables; only GET requests are allowed unless writes are explicitly enabled.

Instructions

Escape hatch: call any Integration API endpoint directly, for the parts of the API this server does not wrap — switch stacks, LAG, VPN servers, RADIUS profiles, WAN interfaces, device tags, ACL rules, DNS policies and the DPI reference tables. Paths are relative to the API root, so /sites and /sites/<uuid>/wans, and the site must be a real UUID here — this tool does NOT resolve site names, so get one from unifi_list_sites first. Writes are DISABLED: only GET is permitted. Set UNIFI_ALLOW_WRITES=1 to allow mutations, which also registers the purpose-built write tools.

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_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoJSON request body, for POST, PUT and PATCH. Sent verbatim.
pathYesPath relative to the Integration API root, starting with `/` — e.g. `/info`, `/sites`, `/sites/<site-uuid>/wans`. Not a full URL.
queryNoQuery parameters, e.g. `{"limit": 50, "filter": "state.eq('OFFLINE')"}`.
methodNoHTTP method. Only GET is available while writes are disabled.GET
revealSecretsNoReturn passphrases and keys in clear instead of masked as `[redacted]`. Only when the user has explicitly asked to see or work with the real value — results land in transcripts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • addedInput schema / properties / revealSecrets
      Added value: +{
      +  "default": false,
      +  "description": "Return passphrases and keys in clear instead of masked as `[redacted]`. Only when the user has explicitly asked to see or work with the real value — results land in transcripts.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.5.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observedv0.4.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/destructiveHint; the description adds substantive behavior on top — writes are DISABLED and only GET is permitted, mutations require an env flag, and revealSecrets defaults to masking passphrases/keys as `[redacted]` with a warning that results land in transcripts. These are exactly the operational constraints an agent cannot infer from 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 identity of the tool, then the path/site-ID constraint, then the write restriction — the order an agent needs them. Every sentence carries a constraint or a routing hint; there is no filler or restatement of the tool name.

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?

Covers the essentials for a 5-parameter passthrough: permitted method, path format, query format, body verbatim behavior, and secret masking. The only shortfall is that there is no output schema and the description says nothing about response shape or error behavior for arbitrary endpoints, though for an escape hatch that gap is minor.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: paths are relative to the API root with concrete examples (`/sites`, `/sites/<uuid>/wans`), and the site segment must be a real UUID because no name resolution happens. It also flags the consequence of revealSecrets rather than just its type.

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?

Opens with a specific framing — 'Escape hatch: call any Integration API endpoint directly, for the parts of the API this server does not wrap' — and then enumerates concrete resources it reaches (switch stacks, LAG, VPN servers, RADIUS profiles, WAN interfaces, ACL rules, DNS policies). That immediately distinguishes it from the sibling list/get tools, which are all purpose-built reads.

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?

Explicit about when to use it (unwrapped parts of the API) versus the purpose-built tools, and it names a concrete prerequisite step: get a real site UUID from `unifi_list_sites` first because this tool does not resolve site names. It also states the write gating condition and how to change it (UNIFI_ALLOW_WRITES=1).

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