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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/browser-manager.ts:295-315 (handler)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}` }; } }
- src/tools.ts:83-90 (schema)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: {} } },
- src/tools.ts:515-516 (handler)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();