Skip to main content
Glama

session_list

Read-onlyIdempotent

List retained sessions owned by the selected client token, optionally filtered by client_id. Does not require an online device. Returns session_id, device, original command, timestamps, lifecycle status and retained output cursor range, sorted by start time. Use output_start_cursor to read retained output; output_end_cursor skips to the current end. Finished records expire after 30 minutes or may be evicted when new sessions start. No shell state or live working directory is inferred. Only this token's sessions are visible.

Input Schema

NameRequiredDescriptionDefault
client_idNoSix lowercase letters or digits from list_clients. Required for multi-device tokens, even when only one device is online; optional for single-device tokens.
client_tokenYesTarget client connection token, required with management access (including stdio and no-password mode). Device-scoped bearer access implicitly selects its own token.

Output Schema

NameRequiredDescriptionDefault
sessionsYesRetained sessions owned by this client token, optionally filtered by device.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare this as a safe read-only operation, and the description adds substantial extra context: expiration after 30 minutes, possible eviction when new sessions start, visibility limited to this token, no inferred shell state, and sorted results. These are meaningful behavioral traits beyond the structured annotations.

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 definition is front-loaded with purpose and scope, and most sentences carry useful information. However, it runs long and the final sentence ('Only this token's sessions are visible') largely restates the ownership scope already given in the opening clause.

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?

Despite having an output schema, the description still usefully names return fields, sorting order, cursor semantics, expiration behavior, and visibility scope. For a read-only list tool with complete schema coverage, this is fully sufficient for correct invocation.

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 coverage is 100%, so the schema already documents both parameters thoroughly. The description adds only that client_id is an optional filter; it does not add syntax or constraints beyond what the schema provides, so baseline 3 is appropriate.

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 retained sessions') plus a precise ownership scope ('owned by the selected client token'). It distinguishes the listing operation from reading retained output by pointing to output_start_cursor/output_end_cursor, so an agent can tell it apart from session_read without opening schemas.

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?

It clearly states that no online device is required and explains how to use the returned cursor fields to read output or jump to the current end. It does not explicitly contrast itself with session_read or session_control, but the context is clear enough for selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources