Skip to main content
Glama

multi_browserbase_stagehand_session_list

List and monitor all active parallel browser sessions to manage automation workflows, verify session status, and retrieve session IDs for debugging.

Instructions

ONLY WORKS WITH MULTI-SESSION TOOLS! Track all parallel sessions: Critical tool for multi-session management! Shows all active browser sessions with their IDs, names, ages, and Browserbase session IDs. Use this frequently to monitor your parallel automation workflows, verify sessions are running, and get session IDs for session-specific tools. Essential for debugging and resource management in complex multi-browser scenarios.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Full tool definition including the handler function that lists active sessions from stagehandStore.list(), formats session info (ID, name, Browserbase ID, age), and returns formatted text output.
    export const listSessionsTool = defineTool({
      capability: "list_sessions",
      schema: {
        name: "multi_browserbase_stagehand_session_list",
        description:
          "ONLY WORKS WITH MULTI-SESSION TOOLS! Track all parallel sessions: Critical tool for multi-session management! Shows all active browser sessions with their IDs, names, ages, and Browserbase session IDs. Use this frequently to monitor your parallel automation workflows, verify sessions are running, and get session IDs for session-specific tools. Essential for debugging and resource management in complex multi-browser scenarios.",
        inputSchema: z.object({}),
      },
      handle: async (): Promise<ToolResult> => {
        const sessions = stagehandStore.list();
    
        if (sessions.length === 0) {
          return {
            action: async () => ({
              content: [
                {
                  type: "text",
                  text: "No active sessions",
                },
              ],
            }),
            waitForNetwork: false,
          };
        }
    
        const sessionInfo = sessions.map((s) => ({
          id: s.id,
          name: s.metadata?.name,
          browserbaseSessionId: s.metadata?.bbSessionId,
          created: new Date(s.created).toISOString(),
          age: Math.floor((Date.now() - s.created) / 1000),
        }));
    
        return {
          action: async () => ({
            content: [
              {
                type: "text",
                text: `Active sessions (${sessions.length}):\n${sessionInfo
                  .map(
                    (s) =>
                      `- ${s.id}${s.name ? ` (${s.name})` : ""} - BB: ${s.browserbaseSessionId} - Age: ${s.age}s`,
                  )
                  .join("\n")}`,
              },
            ],
          }),
          waitForNetwork: false,
        };
      },
    });
  • Tool schema with name 'multi_browserbase_stagehand_session_list', description for multi-session tracking, and empty input schema (no parameters required).
    schema: {
      name: "multi_browserbase_stagehand_session_list",
      description:
        "ONLY WORKS WITH MULTI-SESSION TOOLS! Track all parallel sessions: Critical tool for multi-session management! Shows all active browser sessions with their IDs, names, ages, and Browserbase session IDs. Use this frequently to monitor your parallel automation workflows, verify sessions are running, and get session IDs for session-specific tools. Essential for debugging and resource management in complex multi-browser scenarios.",
      inputSchema: z.object({}),
  • Tool (listSessionsTool) imported from multiSession.ts and registered in the multiSessionTools array, which is included in the main TOOLS export used for MCP tool registration.
    export const multiSessionTools = [
      createSessionTool,
      listSessionsTool,
      closeSessionTool,
      navigateWithSessionTool,
      actWithSessionTool,
      extractWithSessionTool,
      observeWithSessionTool,
      getUrlWithSessionTool,
      getAllUrlsWithSessionTool,
    ];
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it tracks and displays session details (IDs, names, ages, Browserbase session IDs), is critical for management, and should be used frequently for monitoring and debugging. However, it lacks details on potential limitations like rate limits or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with key information but includes some redundant emphasis (e.g., 'Critical tool for multi-session management!', 'Essential for debugging...'). Sentences like 'Track all parallel sessions:' and 'Shows all active browser sessions...' are efficient, but the overall text could be more streamlined without losing clarity.

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?

Given the tool's complexity (multi-session management), no annotations, no output schema, and 0 parameters, the description is fairly complete. It explains the purpose, usage, and behavioral context well. However, it could benefit from more details on output format or error handling to be fully comprehensive.

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?

The tool has 0 parameters, and schema description coverage is 100%, so the baseline is 4. The description adds no parameter information, which is appropriate since there are no parameters to document, maintaining the baseline score.

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 the tool's purpose: 'Track all parallel sessions' and 'Shows all active browser sessions with their IDs, names, ages, and Browserbase session IDs.' It distinguishes from siblings by emphasizing it's 'ONLY WORKS WITH MULTI-SESSION TOOLS!' and specifically for multi-session management, unlike single-session tools like browserbase_session_create.

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 provides explicit guidance on when to use it: 'Use this frequently to monitor your parallel automation workflows, verify sessions are running, and get session IDs for session-specific tools.' It also specifies context: 'Essential for debugging and resource management in complex multi-browser scenarios,' and implies alternatives by noting it's for multi-session tools only.

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/vaibhavAtlys/mcp-server-browserbase'

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