Skip to main content
Glama

list_sessions

Retrieve a list of all active terminal sessions, including SSH and local connections, to check statuses and obtain session IDs.

Instructions

List all currently active terminal sessions (SSH and local) managed by this server.

USAGE GUIDELINES:
- Use this tool to discover existing sessions, check connection statuses, and retrieve active session_ids.
- Recommended prerequisite: Call this tool before executing commands if you need to resume or verify an existing session.
- Do NOT use this tool if you already know the session_id and just want to run commands directly.

ALTERNATIVES:
- If you want to create a new session instead of listing existing ones, use create_local or connect_ssh.
- If you want to stop/close an active session, use disconnect.

Returns:
    A list of dictionaries, each containing:
        - session_id: Unique identifier of the session.
        - type: Either 'ssh' or 'local'.
        - host (SSH only): The remote hostname connected to.
        - port (SSH only): The remote port connected to.
        - shell (local only): The shell executable running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It describes the outcome (list active sessions) and return structure, but does not explicitly state read-only nature or other behavioral traits like authentication or rate limits. However, the simple listing nature is implied, and the return format is disclosed.

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?

The description is concise with clear sections: a one-sentence purpose, bulleted guidelines, alternatives, and return format. Every part adds value without redundancy.

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?

For a simple zero-parameter list tool with an output schema described, the description is complete. It covers when to use, what it returns, and how it relates to other tools. No gaps remain for effective usage.

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?

There are zero parameters, and the schema coverage is 100%. The description adds significant meaning by detailing the return fields (session_id, type, host, port, shell) beyond the empty schema, which helps an agent understand the output.

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 clearly states 'List all currently active terminal sessions (SSH and local) managed by this server.' It uses a specific verb and resource, and the sibling tools like connect_ssh, create_local, and disconnect are distinct.

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?

The description includes dedicated USAGE GUIDELINES and ALTERNATIVES sections, explicitly stating when to use (discover sessions, check status), a recommended prerequisite, and what not to use. It also names alternative tools for creation or termination.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/QiuwenZheng/interminal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server