Skip to main content
Glama

list_sessions

View all active Gemini ACP sessions to monitor workspace paths, session IDs, turn counts, and models in use.

Instructions

List all active ACP sessions managed by the bridge. Shows workspace path, session ID, turn count, and model for each session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The list_sessions tool implementation in server.py, which registers the tool and defines the handler function to list active sessions from the bridge.
    @mcp.tool(
        name="list_sessions",
        annotations=ToolAnnotations(
            title="List Active Sessions",
            readOnlyHint=True,
            destructiveHint=False,
            idempotentHint=True,
            openWorldHint=False,
        ),
        description="List all active ACP sessions managed by the bridge. "
        "Shows workspace path, session ID, turn count, and model for each session.",
    )
    async def list_sessions() -> Dict[str, Any]:
        """List active sessions."""
        sessions = []
        for workspace, info in _bridge._sessions.items():
            sessions.append(
                {
                    "workspace": workspace,
                    "session_id": info["session_id"],
                    "turn_count": info["turn_count"],
                    "max_turns": _MAX_TURNS_PER_SESSION,
                    "model": info.get("actual_model", ""),
                }
            )
        return {
            "sessions": sessions,
            "count": len(sessions),
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/shenyunhuan/gemini_mcp'

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