Skip to main content
Glama

List recent events

unifi_list_events
Read-only

Lists recent UniFi controller events newest first for the last 24 hours by default, covering client connects and roams, device restarts, upgrades, and v2 system log alerts when classic events are empty.

Instructions

List recent controller events, newest first (default last 24 hours): client connects and roams, device restarts, upgrades and the like, with time, key, subsystem and message. Falls back to the v2 system log's device and client alerts where the classic event log is gone or empty. For other log classes (admin activity, threats, VPN...) use unifi_get_system_log; for unresolved problems use unifi_list_alarms.

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

Input Schema

NameRequiredDescriptionDefault
siteNoSite name/ID as used in the API (e.g. 'default'). Defaults to the configured site. See unifi_list_sites.
hoursNoLook back this many hours (default 24; the classic event log rounds fractions up to whole hours)
limitNoMaximum items to return (default 100)
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. Changed5 schema fields changedv0.9.1
    • addedInput schema / properties / fields / description
      Added value: +"Only return these fields per item (dot paths, e.g. uplink.name)"
    • changedInput schema / properties / hours / description
      Previous value: -"Look back this many hours (default 24)"New value: +"Look back this many hours (default 24; the classic event log rounds fractions up to whole hours)"
    • changedInput schema / properties / hours / type
      Previous value: -"integer"New value: +"number"
    • changedInput schema / properties / limit / description
      Previous value: -"Default 100"New value: +"Maximum items to return (default 100)"
    • addedInput schema / properties / search / description
      Added value: +"Case-insensitive substring match on names, MACs, IPs and similar"
  2. First observedv0.8.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only and closed-world safety, so the bar is lower, yet the description still adds real behavior: newest-first ordering, the default 24-hour window, and a fallback to the v2 system log when the classic event log is gone or empty. It does not discuss result caps or truncation beyond the limit parameter, which keeps it short of a 5.

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 sentences, front-loaded with what the tool returns and immediately followed by where the agent should go instead. Every clause carries information — event types, fallback, and two sibling disambiguations — with no filler.

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?

There is no output schema, but the description names the returned fields (time, key, subsystem, message) and explains the fallback path, so an agent knows what it will get. Combined with full parameter coverage and the read-only annotations, nothing needed to call this correctly is missing.

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%, so all five parameters (site, hours, limit, fields, search) are already documented with defaults, bounds and formats. The description only restates the 24-hour default and adds no syntax or selection guidance beyond the schema, so the baseline 3 applies.

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 description gives a specific verb and resource (list recent controller events) plus ordering (newest first) and a default window (last 24 hours). It then enumerates concrete event types — client connects and roams, device restarts, upgrades — and the returned fields, which lets an agent distinguish this from unifi_get_system_log and unifi_list_alarms 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 Guidelines5/5

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

It explicitly routes the agent away: other log classes (admin activity, threats, VPN) go to unifi_get_system_log and unresolved problems go to unifi_list_alarms. It also states the internal fallback condition, so the agent knows this tool already covers the device/client-alert case.

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