Skip to main content
Glama
jaseonline

unifi-console-mcp

by jaseonline

unifi_console_firewall_policy_hits

Read-onlyIdempotent

List UniFi firewall policies with hit counts and last-hit times to audit rule usage and find unused, noisy, or stale rules.

Instructions

List zone-based firewall policies with hit counts and last-hit time, for audits.

Finds unused rules (zero hits), noisy rules and stale rules. The Integration API does not expose hit counts. Read-only: to change policies use the existing firewall tools.

Returns JSON: {"ok", "meta", "data": [{"name", "id", "index", "action", "enabled", "predefined", "hits", "last_hit", "logging", "source_zone", "destination_zone"}]}.

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint/idempotentHint/destructiveHint=false, yet the description still adds real value: the Integration API does not expose hit counts (explaining why this tool exists), the read-only guarantee, and the shape of the returned record. It stops short of pagination, rate-limit, or refresh/latency behavior, so it is strong but not exhaustive.

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-loaded with purpose, then audit use cases, then the read-only caveat, then the return contract. Three tight blocks with no filler or repetition of the title.

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?

Purpose, selection criteria, safety posture, and the sibling to use for writes are all present; parameter detail lives in the nested schema and an output schema exists, so restating return fields is optional. An agent has everything needed to select and call this correctly.

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

Parameters2/5

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

The description contributes nothing about the input parameters — its only field list is the response payload, not the request. The nested schema descriptions (e.g. "'hits' ascending surfaces unused rules first") do the work, but with the reported 0% description coverage the prose was expected to compensate and does not.

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?

Specific verb and resource ('List zone-based firewall policies') plus the distinguishing payload ('hit counts and last-hit time, for audits'). This separates it cleanly from the sibling unifi_console_firewall_policy, which handles policy mutation, without the agent needing to open either schema.

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 concrete when-to-use conditions ('audits', 'unused rules (zero hits), noisy rules and stale rules') and an explicit when-not with a redirect: 'to change policies use the existing firewall tools'. Only weakness is that the alternative is referred to generically rather than by exact tool name, but the routing intent is unambiguous.

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