Skip to main content
Glama

browser_close_all_instances

Terminate all active browser instances running on the Concurrent Browser MCP server to ensure a clean state or free resources.

Instructions

Close all browser instances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation that closes all browser instances by awaiting Promise.all on each browser.close() and clearing the instances map.
    async closeAllInstances(): Promise<ToolResult> { try { const closePromises = Array.from(this.instances.values()).map( instance => instance.browser.close() ); await Promise.all(closePromises); const closedCount = this.instances.size; this.instances.clear(); return { success: true, data: { closedCount } }; } catch (error) { return { success: false, error: `Failed to close all instances: ${error instanceof Error ? error.message : error}` }; } }
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    { name: 'browser_close_all_instances', description: 'Close all browser instances', inputSchema: { type: 'object', properties: {} } },
  • Handler dispatch case in BrowserTools.executeTools() that delegates to BrowserManager.closeAllInstances().
    case 'browser_close_all_instances': return await this.browserManager.closeAllInstances();
  • src/tools.ts:515-516 (registration)
    Registration of the tool handler within the switch statement of executeTools method.
    case 'browser_close_all_instances': return await this.browserManager.closeAllInstances();

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