Skip to main content
Glama

browser_close_instance

Close a specific browser instance by its Instance ID on the Concurrent Browser MCP server, enabling efficient management of multiple parallel browser sessions.

Instructions

Close the specified browser instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceIdYesInstance ID

Implementation Reference

  • Defines the input schema for the 'browser_close_instance' tool, requiring an 'instanceId' string parameter.
    { name: 'browser_close_instance', description: 'Close the specified browser instance', inputSchema: { type: 'object', properties: { instanceId: { type: 'string', description: 'Instance ID' } }, required: ['instanceId'] } },
  • Handler case in BrowserTools.executeTools method that invokes BrowserManager.closeInstance for the tool execution.
    case 'browser_close_instance': return await this.browserManager.closeInstance(args.instanceId);
  • Core helper method in BrowserManager that closes the specified browser instance by closing the browser object and removing it from the internal instances map.
    async closeInstance(instanceId: string): Promise<ToolResult> { try { const instance = this.instances.get(instanceId); if (!instance) { return { success: false, error: `Instance ${instanceId} not found` }; } await instance.browser.close(); this.instances.delete(instanceId); return { success: true, data: { instanceId, closed: true }, instanceId }; } catch (error) { return { success: false, error: `Failed to close instance: ${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