Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Create Traffic Matching List

unifi_create_traffic_matching_list

Create a reusable traffic-matching list of IP addresses or ports that firewall policies can reference. Define the name, type, and entries to build named lists for UniFi firewall rules.

Instructions

Create a reusable traffic-matching list (named IP-address or port list referenced by firewall policies). 'config' requires name and type (IPV4_ADDRESSES / IPV6_ADDRESSES / PORTS), plus the list entries. Model it on an existing list via unifi_get_traffic_matching_list.

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": {
      "config": "<config>"
    },
    "name": "unifi_create_traffic_matching_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
configYesFull traffic-matching-list object. Required: name, type, plus entries. See unifi_get_traffic_matching_list. A config with any value still containing "[redacted]" (how reads show credentials) is refused: put the real value in, or leave the field out.
siteIdNoSite ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

The annotations already declare that this is a non-read-only, non-idempotent, non-destructive, open-world write. The description adds useful context about reusability and the dependency on firewall policies, but doesn't say what happens on duplicate names, how failures surface, or what is returned. The refuse-on-credentials rule appears only in the schema, not the description, so behavior beyond the annotations is only partly covered.

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

Conciseness4/5

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

Three tight sentences, led by the definition of what is created, then the required config shape, then the pointer to the retrieval sibling as a template. The required-field sentence slightly overlaps the schema description, but nothing is padding.

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 nested free-form config with no output schema, the definition supplies the concept, the required keys, the type values and a template source, which is enough for an agent to construct a valid call. The remaining gap, the internal structure of list entries, is only partially covered by the schema's 'see unifi_get_traffic_matching_list' pointer.

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%, but the config object is free-form, with no enum restriction on 'type'. The description therefore adds real meaning by naming the allowed values (IPV4_ADDRESSES / IPV6_ADDRESSES / PORTS), and it reinforces what entries are required. It doesn't describe the shape of individual list entries, which is the main remaining gap.

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?

The definition names a specific verb and resource ('Create a reusable traffic-matching list') and immediately explains what the resource is: a named IP-address or port list referenced by firewall policies. That framing lets an agent distinguish it from unifi_get_traffic_matching_list, unifi_update_traffic_matching_list, and the other list/create siblings without opening any schema.

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?

The definition clearly routes the agent to unifi_get_traffic_matching_list as the template source, and the mention of firewall policies tells the agent when this kind of list is appropriate. It doesn't state exclusions, such as when to use a firewall policy directly instead of a list, so it falls short of a full when/when-not pair.

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

Deploy Server

Other Tools