Skip to main content
Glama

Close Browser

close_browser

Closes the browser window while preserving login sessions for future automated access to authenticated web content.

Instructions

Closes the browser window. Login sessions are saved and will be reused next time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core logic function that actually closes the browser context.
    export async function closeBrowser(): Promise<void> {
      if (context) {
        await context.close();
        context = null;
      }
    }
  • src/tools.ts:197-209 (registration)
    Registration of the close_browser tool in the MCP server.
    // ── close_browser ─────────────────────────────────────────────────
    server.registerTool(
      "close_browser",
      {
        title: "Close Browser",
        description:
          "Closes the browser window. Login sessions are saved and will be reused next time.",
      },
      async () => {
        await closeBrowser();
        return textResult({
          message: "Browser closed. Sessions are saved for next time.",
        });
Install Server

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/ymw0407/auth-fetch-mcp'

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