Skip to main content
Glama

close_browser

Terminate the current browser instance in MCP Browser Server to manage resources effectively and end automated web interactions.

Instructions

Close the current browser instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler case for 'close_browser' tool that closes the current browser instance if it exists, nullifies the global browser/context/page variables, and returns an appropriate success or informational message.
    case 'close_browser': { if (currentBrowser) { await currentBrowser.close(); currentBrowser = null; currentContext = null; currentPage = null; return { content: [ { type: 'text', text: 'Browser closed successfully' } ] }; } else { return { content: [ { type: 'text', text: 'No browser instance to close' } ] }; } }
  • src/index.ts:323-329 (registration)
    Registration of the 'close_browser' tool in the ListTools response, including its name, description, and empty input schema (no parameters required).
    name: 'close_browser', description: 'Close the current browser instance', inputSchema: { type: 'object', properties: {} } },

Other Tools

Related Tools

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/Wladastic/mcp-browser-server'

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