Skip to main content
Glama

browser_list_instances

Lists all active browser instances to manage multiple parallel browsing sessions in the Concurrent Browser MCP server.

Instructions

List all browser instances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Defines the tool schema for 'browser_list_instances', including name, description, and empty input schema (no parameters required).
    { name: 'browser_list_instances', description: 'List all browser instances', inputSchema: { type: 'object', properties: {} } },
  • Handler case in executeTools method that executes the tool by calling BrowserManager.listInstances().
    case 'browser_list_instances': return this.browserManager.listInstances();
  • Core implementation of listing all browser instances, mapping instance data and returning structured ToolResult.
    listInstances(): ToolResult { const instanceList = Array.from(this.instances.values()).map(instance => ({ id: instance.id, isActive: instance.isActive, createdAt: instance.createdAt.toISOString(), lastUsed: instance.lastUsed.toISOString(), metadata: instance.metadata, currentUrl: instance.page.url() })); return { success: true, data: { instances: instanceList, totalCount: this.instances.size, maxInstances: this.config.maxInstances } }; }
  • src/server.ts:40-45 (registration)
    Registers the MCP listTools handler which returns all tools including 'browser_list_instances' via BrowserTools.getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { const tools = this.browserTools.getTools(); return { tools: tools, }; });
  • src/server.ts:48-75 (registration)
    Registers the MCP callTool handler which dispatches to BrowserTools.executeTools for executing 'browser_list_instances' and other tools.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await this.browserTools.executeTools(name, args || {}); if (result.success) { return { content: [ { type: 'text', text: JSON.stringify(result.data, null, 2), }, ], }; } else { throw new McpError(ErrorCode.InternalError, result.error || 'Tool execution failed'); } } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Tool execution failed: ${error instanceof Error ? error.message : error}` ); } });

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/sailaoda/concurrent-browser-mcp'

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