Skip to main content
Glama

List client sessions

unifi_list_client_sessions
Read-only

List client connection sessions newest first, with IP, connect/disconnect times, duration, AP, SSID, network, and bytes; filter by MAC, guest/user, time range, and site.

Instructions

List client connection sessions, newest first (default last 168 hours): client, IP, connect and disconnect times, duration, AP, SSID, network and bytes; filter by client MAC or guest/user. For who is connected now use unifi_list_clients.

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

Input Schema

NameRequiredDescriptionDefault
macNoOnly sessions for this client
siteNoSite name/ID as used in the API (e.g. 'default'). Defaults to the configured site. See unifi_list_sites.
typeNoClient type (default all)
hoursNoLook back this many hours (default 168)
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. Changed3 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 / 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.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description adds genuinely non-derivable behavior: results are ordered newest-first, the lookback window defaults to 168 hours, and the per-session fields returned. It does not mention truncation behavior at the limit boundary (default 100, max 5000), which would matter when a client has many sessions.

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, zero filler, with the scope and ordering front-loaded before the filter options and the sibling routing at the end. The mid-sentence field list is dense but each item is value the agent would otherwise have to guess from the schema.

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?

Seven all-optional parameters with no output schema, so the description carries the return-shape burden itself and does so by enumerating the session fields verbatim. Combined with the default window, ordering, and the sibling alternative, nothing essential to calling this correctly is missing.

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 description coverage is 100%, so the baseline is 3, and the description modestly exceeds it by tying the mac and type parameters to the stated filtering purpose ("filter by client MAC or guest/user") and surfacing the 168-hour default. It still leaves `search` and `fields` entirely to the schema, so it adds only partial meaning beyond structured data.

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?

Names a specific verb and resource ("List client connection sessions"), states ordering (newest first) and default window (168 hours), and enumerates the returned payload so an agent knows exactly what it gets. It also explicitly contrasts with the sibling unifi_list_clients, so the tool is distinguishable without opening 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 an explicit routing rule: "For who is connected now use unifi_list_clients," which names the alternative and the condition that selects it. The historical-sessions-vs-current-state distinction is the single most important usage decision here and it is stated outright rather than left to inference.

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