Skip to main content
Glama

browser_close

Close the current browser page in Playwright MCP to manage browser automation sessions and free system resources.

Instructions

Close the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the browser_close tool. Closes the browser context and instructs to include tabs in response with a code snippet to close the page.
    handle: async (context, params, response) => { await context.closeBrowserContext(); response.setIncludeTabs(); response.addCode(`await page.close()`); },
  • Input/output schema definition for the browser_close tool. No input parameters required, marked as readOnly.
    name: 'browser_close', title: 'Close browser', description: 'Close the page', inputSchema: z.object({}), type: 'readOnly', },
  • src/tools.ts:17-37 (registration)
    Imports the common tools module (containing browser_close) and registers it by spreading into the allTools export array used by the MCP server backend.
    import common from './tools/common.js'; import console from './tools/console.js'; import dialogs from './tools/dialogs.js'; import evaluate from './tools/evaluate.js'; import files from './tools/files.js'; import install from './tools/install.js'; import keyboard from './tools/keyboard.js'; import navigate from './tools/navigate.js'; import network from './tools/network.js'; import pdf from './tools/pdf.js'; import snapshot from './tools/snapshot.js'; import tabs from './tools/tabs.js'; import screenshot from './tools/screenshot.js'; import wait from './tools/wait.js'; import mouse from './tools/mouse.js'; import type { Tool } from './tools/tool.js'; import type { FullConfig } from './config.js'; export const allTools: Tool<any>[] = [ ...common,

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/nzjami/mcpPlaywright'

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