Skip to main content
Glama
UniFi Network API MCP Server

UniFi Network API MCP Server

by sevaepsteyn

search_devices

Find UniFi devices by site, model, state, or name pattern; use wildcard matching to filter and locate specific devices.

Instructions

Search for devices with optional filters.

Use wildcards in name_pattern: * matches any characters, . matches single character. Example: "AP-*" matches all devices starting with "AP-"

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": {
      "site_id": "<site_id>"
    },
    "name": "search_devices"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoDevice model to filter by
stateNoDevice state to filter by (ONLINE, OFFLINE, etc)
site_idYesSite UUID
name_patternNoDevice name pattern (supports wildcards)

Output Schema

NameRequiredDescriptionDefault
devicesYes
totalCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden; "search" implies a safe read, and the wildcard explanation adds real behavioral detail about matching. It is silent on pagination, result caps, empty-result behavior, and permissions, which matter for a search tool with no annotation coverage.

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?

Two tight blocks: the purpose statement first, then the wildcard rule with an example. Every sentence carries information and nothing is repeated from the schema.

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 four fully documented parameters and an output schema that covers return values, the description supplies what the schema cannot, namely wildcard syntax. Missing pagination or result-size guidance keeps it short of complete for a search endpoint, but the essentials are present.

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%, so a baseline of 3 is warranted, and the description goes beyond it by defining the wildcard grammar (`*` for any characters, `.` for a single character) plus a concrete example. This clarifies the `name_pattern` parameter in a way the schema only gestures at with "supports wildcards".

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?

The description gives a specific verb and resource ("Search for devices") and notes that filters are optional, so the agent knows this is a filtered query rather than a full listing. It does not differentiate from the sibling "devices" or "device_details" tools, so the agent cannot tell from the text alone when this beats a plain listing.

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

Usage Guidelines3/5

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

Usage is only implied: search when you want to narrow by name/model/state. There is no explicit when-not guidance, no mention of what to use for unfiltered listings or single-device lookups, and no note on whether site_id scoping is mandatory behavior versus schema requirement.

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