Skip to main content
Glama

browser_close_all_instances

Close all open browser instances to free system resources and ensure clean browser state for testing or automation workflows.

Instructions

Close all browser instances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler method in BrowserManager that closes all active browser instances by awaiting the close promises for each browser 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}` }; } }
  • Dispatch handler in BrowserTools.executeTools() that delegates to BrowserManager.closeAllInstances().
    case 'browser_close_all_instances': return await this.browserManager.closeAllInstances();
  • src/tools.ts:83-90 (registration)
    Tool registration in BrowserTools.getTools(), defining the tool name, description, and empty input schema.
    { name: 'browser_close_all_instances', description: 'Close all browser instances', inputSchema: { type: 'object', properties: {} } },
  • Input schema definition for the tool (empty object properties).
    inputSchema: { type: 'object', properties: {} }

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