Skip to main content
Glama

unifi_threat_summary

Read-onlyIdempotent

Generate a prioritized UniFi threat summary from security logs, grouping by direction and LAN side, ranking by severity and count, and surfacing remote IPs, timestamps, and port forwards.

Instructions

What security issues need attention: SECURITY log entries (default last 7 days) grouped by direction and LAN side (inbound to a client, outbound from a client, firewall blocks, other keys), ranked by worst severity then count. Each group has counts by severity, first/last seen, distinct remote IPs with the top 5, and the port forwards that expose an inbound target. Groups past maxGroups are summarised as a tail, never dropped; topRemotesOverall shows one remote hitting several clients. Reads up to 20000 log entries and says how far back it got if the range was longer.

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

Input Schema

NameRequiredDescriptionDefault
siteNoSite name, id or reference; optional while the console has a single site
sinceNoStart of the range: an ISO 8601 timestamp (2026-10-31T08:00:00Z) or a span back from now such as 90m, 24h, 7d or 2w
untilNoEnd of the range (default now): an ISO 8601 timestamp (2026-10-31T08:00:00Z) or a span back from now such as 90m, 24h, 7d or 2w
maxGroupsNoGroups to list before the rest are summarised (default 15, at most 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior5/5

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

Annotations already cover the read-only, idempotent, closed-world profile, and the description adds real behavior beyond them: it reads up to 20000 log entries, reports how far back it actually got when the range is longer, and guarantees that groups past maxGroups are summarised as a tail rather than dropped. The truncation and coverage-limit disclosures are exactly the kind of caveat an agent needs before trusting the output as complete.

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?

The answer is front-loaded with the 'what needs attention' framing and then enumerates the grouping, ranking, and payload in a dense but well-ordered way. It is a single long run of clauses with no filler, though the mid-sentence parenthetical list of group kinds makes it harder to scan than a short bulleted structure would be.

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 no output schema, the description carries the burden of describing the return value, and it does so thoroughly: per-group severity counts, first/last seen, top 5 distinct remotes, exposing port forwards, tail groups, and topRemotesOverall. The only real gap is the absence of any prerequisite or permission note for reading security logs on a site.

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 the baseline is 3, and the description adds meaning on top: it restates the 7-day default window for the time range and clarifies that maxGroups truncation is lossless ('summarised as a tail, never dropped'), which the schema's phrasing does not guarantee. It does not explain the 'direction' or 'LAN side' keys as parameters, but those are output concepts rather than inputs.

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 names a concrete resource and scope: SECURITY log entries over a time range, grouped by direction and LAN side and ranked by severity. That is enough to separate it from unifi_audit_log and unifi_events in practice, but it never names a sibling or states the distinction explicitly, so it stops short of a 5.

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 implied rather than stated: the framing 'What security issues need attention' tells an agent this is the triage view, and the 'default last 7 days' note gives a working default. There is no explicit when-to-use/when-not-to-use guidance and no routing to unifi_audit_log or unifi_events for non-SECURITY entries.

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