Skip to main content
Glama

terminal_list

View all active terminal sessions to monitor and manage multiple command-line interfaces across platforms.

Instructions

List all active terminal sessions.

Returns information about all terminal sessions that are currently
open and active.

Returns:
    dict: Contains a list of terminal sessions with their details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `terminal_list` function handles listing active terminal sessions by retrieving them from the `SessionManager`.
    async def terminal_list() -> dict:
        """List all active terminal sessions.
    
        Returns information about all terminal sessions that are currently
        open and active.
    
        Returns:
            dict: Contains a list of terminal sessions with their details.
        """
        manager = SessionManager.get_instance()
        sessions = await manager.list_sessions()
    
        return {
            "count": len(sessions),
            "terminals": [
                {
                    "session_id": s.id,
                    "name": s.name,
                    "platform": s.platform,
                }
                for s in sessions
            ],
        }
  • The tool `terminal_list` is registered using the `@mcp.tool` decorator.
    @mcp.tool(
        name="terminal_list",
        annotations={
            "title": "List Terminals",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        },
    )

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/Hor1zonZzz/terminal-mcp'

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