Skip to main content
Glama

session_list

Read-onlyIdempotent

Find retained sessions on online devices. Use status=idle to find reusable terminals or status=live to inspect occupied terminal slots.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "control_token": "<control_token>"
    },
    "name": "session_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusNoFilter sessions by status. all is the default. live includes running and idle.
client_idNoDevice ID from list_client. Required with multi-device tokens for execute_command, session_read, session_control, and p2p_transfer_start.
control_tokenYesControl credential in token:key format, required with management access (including stdio and no-password mode). Scoped control bearer access implicitly selects its own token.

Output Schema

NameRequiredDescriptionDefault
sessionsYesRetained sessions on the selected online devices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / client_id / description
      Previous value: -"Six lowercase letters or digits from list_client. Required for execute_command, session_read and session_control on multi-device tokens, including existing sessions. Session-list filtering is optional."New value: +"Device ID from list_client. Required with multi-device tokens for execute_command, session_read, session_control, and p2p_transfer_start."
    • changedInput schema / properties / status / description
      Previous value: -"Filter sessions: all (default), live (running or idle), running, idle, or closed. Prefer idle for reuse and live for cleanup inspection."New value: +"Filter sessions by status. all is the default. live includes running and idle."
    • changedOutput schema / properties / sessions / description
      Previous value: -"Retained sessions owned by this client token, filtered by device and status when requested; command previews are at most 160 Unicode characters."New value: +"Retained sessions on the selected online devices."
  2. Changed3 schema fields changed
    • removedInput schema / properties / client_token
      Removed value: -{
      -  "description": "Control credential in token:key format, required with management access (including stdio and no-password mode). Scoped control bearer access implicitly selects its own token.",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedInput schema / properties / control_token
      Added value: +{
      +  "description": "Control credential in token:key format, required with management access (including stdio and no-password mode). Scoped control bearer access implicitly selects its own token.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "client_token"
      -]New value: +[
      +  "control_token"
      +]
  3. Changed4 schema fields changed
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "Filter sessions: all (default), live (running or idle), running, idle, or closed. Prefer idle for reuse and live for cleanup inspection.",
      +  "enum": [
      +    "all",
      +    "live",
      +    "running",
      +    "idle",
      +    "closed"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / sessions / description
      Previous value: -"Retained sessions owned by this client token, optionally filtered by device."New value: +"Retained sessions owned by this client token, filtered by device and status when requested; command previews are at most 160 Unicode characters."
    • changedOutput schema / properties / sessions / items / properties / command / description
      Previous value: -"Latest command submitted through execute_command for this session; does not track subsequent stdin input."New value: +"Latest command preview, at most 160 Unicode characters; shortened previews end with ... (truncated)."
    • changedOutput schema / properties / sessions / items / properties / command_id / description
      Previous value: -"Identity of the latest submitted command."New value: +"Identifier of the latest command. New clients generate eight case-sensitive alphanumeric characters; older clients may return longer IDs."
  4. Changed6 schema fields changed
    • changedInput schema / properties / client_id / description
      Previous value: -"Six lowercase letters or digits from list_clients, used to select or filter devices. For multi-device tokens it is required when a specific device must be selected and no existing session_id identifies it. Session-list filtering is optional."New value: +"Six lowercase letters or digits from list_client. Required for execute_command, session_read and session_control on multi-device tokens, including existing sessions. Session-list filtering is optional."
    • changedInput schema / properties / client_token / description
      Previous value: -"Target client connection token, required with management access (including stdio and no-password mode). Device-scoped bearer access implicitly selects its own token."New value: +"Control credential in token:key format, required with management access (including stdio and no-password mode). Scoped control bearer access implicitly selects its own token."
    • changedOutput schema / properties / sessions / items / properties / exit_code / description
      Previous value: -"Exit code of the latest completed command, or terminal termination if it ended; 0 is success, -1 denotes execution/connection failure. Absent while a command is running."New value: +"execute/read/list: the latest completed command exit code, preserved when its shell later ends. stop: the confirmed shell termination code. 0 means success; -1 denotes execution failure. Transport errors never invent a code."
    • changedOutput schema / properties / sessions / items / properties / session_id / description
      Previous value: -"Session identifier used by session_read and session_control."New value: +"Client-local session identifier. Multi-device read/control also require client_id."
    • changedOutput schema / properties / sessions / items / properties / status / description
      Previous value: -"running: terminal busy or stop pending; idle: command ended and reusable; closed: session is no longer usable. A disconnection error means remote process termination is unconfirmed."New value: +"running: terminal busy or stop pending; idle: command ended and shell reusable; closed: client confirmed shell termination. Transport errors do not imply termination."
    • changedOutput schema / properties / sessions / items / required
      Previous value: -[
      -  "session_id",
      -  "client_id",
      -  "command",
      -  "command_id",
      -  "status"
      -]New value: +[
      +  "session_id",
      +  "command",
      +  "command_id",
      +  "status",
      +  "client_id"
      +]
  5. Changed12 schema fields changed
    • changedInput schema / properties / client_id / description
      Previous value: -"Six lowercase letters or digits from list_clients. Required for multi-device tokens, even when only one device is online; optional for single-device tokens."New value: +"Six lowercase letters or digits from list_clients, used to select or filter devices. For multi-device tokens it is required when a specific device must be selected and no existing session_id identifies it. Session-list filtering is optional."
    • changedOutput schema / properties / sessions / items / properties / command / description
      Previous value: -"Original command used to start this session; does not track subsequent stdin commands."New value: +"Latest command submitted through execute_command for this session; does not track subsequent stdin input."
    • addedOutput schema / properties / sessions / items / properties / command_id
      Added value: +{
      +  "description": "Identity of the latest submitted command.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / sessions / items / properties / done
      Removed value: -{
      -  "description": "True when a terminal result is available or the device connection closed. False means no terminal result is available yet.",
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / sessions / items / properties / ended_at
      Removed value: -{
      -  "description": "Session completion time in UTC (RFC 3339); present only after the session ends.",
      -  "type": [
      -    "null",
      -    "string"
      -  ]
      -}
    • changedOutput schema / properties / sessions / items / properties / exit_code / description
      Previous value: -"Reported process exit code: 0 means success; -1 means execution failed, was interrupted, or the device disconnected before a normal exit report."New value: +"Exit code of the latest completed command, or terminal termination if it ended; 0 is success, -1 denotes execution/connection failure. Absent while a command is running."
    • removedOutput schema / properties / sessions / items / properties / output_end_cursor
      Removed value: -{
      -  "description": "Byte offset after the latest retained output; using it as cursor skips existing output and waits for new output.",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / sessions / items / properties / output_start_cursor
      Removed value: -{
      -  "description": "Earliest retained output byte offset; pass as cursor to read available history.",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / sessions / items / properties / started_at
      Removed value: -{
      -  "description": "Session creation time in UTC (RFC 3339).",
      -  "type": "string"
      -}
    • changedOutput schema / properties / sessions / items / properties / status / description
      Previous value: -"Session lifecycle: running, stopping (cancellation requested), or finished. Does not indicate whether an individual shell command is running."New value: +"running: terminal busy or stop pending; idle: command ended and reusable; closed: session is no longer usable. A disconnection error means remote process termination is unconfirmed."
    • changedOutput schema / properties / sessions / items / properties / status / enum
      Previous value: -[
      -  "running",
      -  "stopping",
      -  "finished"
      -]New value: +[
      +  "running",
      +  "idle",
      +  "closed"
      +]
    • changedOutput schema / properties / sessions / items / required
      Previous value: -[
      -  "session_id",
      -  "client_id",
      -  "command",
      -  "started_at",
      -  "status",
      -  "done",
      -  "output_start_cursor",
      -  "output_end_cursor"
      -]New value: +[
      +  "session_id",
      +  "client_id",
      +  "command",
      +  "command_id",
      +  "status"
      +]
  6. Added

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds one piece of real behavioral context — that only sessions on online devices are retained and visible. It says nothing about result ordering, pagination, or the multi-device/client_id nuance, so the addition is modest.

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, purpose front-loaded, followed immediately by the practical filtering advice. No filler, no restatement of the tool name, and nothing that could be cut without losing information.

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 an output schema present, return values need no explanation, and all three parameters are fully documented in the schema including the token and device-ID requirements. The description covers purpose and the main filter decision. It stops short of explaining how multi-device tokens interact with results, which would help for a listing tool.

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 would be 3. The description earns above baseline by mapping enum values to intent ('idle' = reusable terminals, 'live' = occupied terminal slots), which is semantic guidance the schema does not provide. It leaves status=all, running, and closed, plus client_id and control_token, entirely to the schema.

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?

States a specific verb and resource: 'Find retained sessions on online devices'. The scope qualifiers ('retained', 'online devices') constrain the result set meaningfully. It does not name a sibling such as session_read or session_control to draw the boundary, so it falls 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?

The second sentence gives concrete filter-selection advice (idle for reusable terminals, live for occupied slots), which is genuine when-to guidance. However it addresses only which status value to pass, not when to choose this tool over session_read or session_control, and offers no exclusions.

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