Skip to main content
Glama

browser_close

Close the active browser page in Playwright MCP to end web interactions cleanly and efficiently, ensuring proper session management in browser automation.

Instructions

Close the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'browser_close' tool. It closes the browser context using context.closeBrowserContext() and adds code to close the page.
    handle: async (context, params, response) => { await context.closeBrowserContext(); response.setIncludeTabs(); response.addCode(`await page.close()`); },
  • Schema definition for the 'browser_close' tool, specifying name, title, description, empty input schema, and readOnly type.
    schema: { name: 'browser_close', title: 'Close browser', description: 'Close the page', inputSchema: z.object({}), type: 'readOnly', },
  • The 'close' tool (aliased as browser_close) is registered by being included in the default export array of common tools.
    export default [ close, resize ];

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