Skip to main content
Glama

close_browser

Close the active browser window to terminate browser automation sessions and free system resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.js:91-99 (registration)
    Registration of the 'close_browser' tool. The inline handler closes the browser instance if it exists, resets the page and CDP session variables, and returns a confirmation message.
    server.tool("close_browser", {}, async () => { if (browser) { await browser.close(); browser = null; page = null; cdp = null; } return { content: [{ type: "text", text: "Browser closed" }] }; });
  • server.js:92-98 (handler)
    Handler function logic for 'close_browser' tool: checks if browser is open, closes it, nullifies state variables, and responds with success message.
    if (browser) { await browser.close(); browser = null; page = null; cdp = null; } return { content: [{ type: "text", text: "Browser closed" }] };

Other 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/Myestery/browser-cdp-mcp'

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