Skip to main content
Glama

List traffic rules

unifi_list_traffic_rules
Read-only

List traffic rules that block, allow, or rate-limit client and network traffic by app, domain, IP, region, or internet, including schedules and bandwidth limits.

Instructions

List traffic rules (v2 API) that block, allow or rate-limit traffic from clients or networks by app, app category, domain, IP, region or all internet, with schedule and bandwidth limit. Zone-based firewall policies are separate (unifi_list_firewall_policies).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "unifi_list_traffic_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNoReturn the full controller objects (large)
siteNoSite name/ID as used in the API (e.g. 'default'). Defaults to the configured site. See unifi_list_sites.
fieldsNoOnly return these fields per item (dot paths, e.g. uplink.name)
searchNoCase-insensitive substring match on names, MACs, IPs and similar

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.1
    • addedInput schema / properties / fields / description
      Added value: +"Only return these fields per item (dot paths, e.g. uplink.name)"
    • addedInput schema / properties / search / description
      Added value: +"Case-insensitive substring match on names, MACs, IPs and similar"
  2. First observedv0.8.1

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds two genuinely useful behavioral facts beyond them: this is the v2 API surface (which matters because results may differ from legacy rule endpoints) and that these objects carry schedule and bandwidth-limit attributes. It says nothing about ordering, pagination, or result volume, so with annotations doing the heavy lifting a 3 is right.

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?

Two sentences, front-loaded with the identity of the resource, then the enumeration of match criteria, then the sibling exclusion. The middle enumeration is long but each item is meaningful; no filler or repetition.

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 read-only list tool with a fully described schema and annotations, the description supplies what's missing: what a traffic rule is in this product, its match surface, and which sibling is a different concept. Without an output schema, an agent gets no return-shape hint, which is the only real gap.

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% — site, fields, search and raw are all documented in the schema, including the warning that raw returns large controller objects. The description adds no parameter-level meaning at all, which is acceptable given the schema baseline, but it does not compensate or enhance.

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 traffic rules (v2 API)") and then specifies what those rules actually do — block/allow/rate-limit by app, app category, domain, IP, region or all internet, with schedule and bandwidth limit. It also explicitly excludes a confusable resource by naming unifi_list_firewall_policies, so an agent can distinguish it from the firewall-rule siblings without opening a 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?

Gives a clear selection rule for the most likely confusion: zone-based firewall policies live in unifi_list_firewall_policies, not here. It does not address the other plausible alternatives in the sibling set (unifi_list_firewall_rules, unifi_list_acl_rules, unifi_list_qos_rules), so exclusion guidance is partial rather than complete.

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