Skip to main content
Glama
Xxx00xxX33

Browserbase MCP Server

by Xxx00xxX33

multi_browserbase_stagehand_session_list

List and monitor all active parallel browser sessions to manage automation workflows, verify session status, and obtain IDs for session-specific operations.

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

  • The handler function that lists active browser sessions, including their IDs, names, Browserbase session IDs, creation times, and ages. Returns formatted text output for easy tracking in multi-session workflows.
    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,
      };
    },
  • Schema definition for the tool, specifying name, detailed description emphasizing multi-session usage, and empty input schema since no parameters are 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({}),
    },
  • Includes listSessionsTool in the multiSessionTools array, which is aggregated into the main TOOLS export for MCP server registration.
    export const multiSessionTools = [
      createSessionTool,
      listSessionsTool,
      closeSessionTool,
      navigateWithSessionTool,
      actWithSessionTool,
      extractWithSessionTool,
      observeWithSessionTool,
    ];
  • Main TOOLS array export that includes all tools via multiSessionTools, used to register tools with the MCP server.
    export const TOOLS = [
      ...multiSessionTools,
      ...sessionTools,
      navigateTool,
      actTool,
      extractTool,
      observeTool,
      screenshotTool,
    ];
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 of behavioral disclosure. It effectively describes the tool's behavior: it lists active sessions with specific attributes (IDs, names, ages, Browserbase session IDs) and is critical for debugging and resource management. However, it lacks details on potential limitations like rate limits, error handling, or whether it requires authentication, which could be important for an agent's decision-making.

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

Conciseness4/5

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

The description is front-loaded with key information ('ONLY WORKS WITH MULTI-SESSION TOOLS!') and uses concise sentences to explain purpose and usage. However, it includes some repetitive emphasis (e.g., 'Critical tool', 'Essential for debugging') that slightly reduces efficiency, though overall it remains well-structured and informative.

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 largely complete. It explains what the tool does, when to use it, and its importance in workflows. However, it could benefit from mentioning the output format or any dependencies, but for a parameter-less tool, this is a minor gap.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not discuss parameters, which is appropriate. A baseline score of 4 is applied since the tool has no parameters, and the description focuses on usage context without redundancy.

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 specifies the verb ('track', 'shows') and resource ('parallel sessions', 'active browser sessions'), and distinguishes itself from sibling tools by emphasizing its role in multi-session management, unlike session-specific tools like browserbase_session_create or browserbase_stagehand_act.

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 this tool: 'ONLY WORKS WITH MULTI-SESSION TOOLS!' and 'Use this frequently to monitor your parallel automation workflows, verify sessions are running, and get session IDs for session-specific tools.' It also mentions alternatives implicitly by referencing 'session-specific tools' for further actions, making it clear this is for monitoring and management rather than direct session operations.

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

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