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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/common.ts:31-35 (handler)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()`); },
- src/tools/common.ts:23-29 (schema)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', },
- src/tools/common.ts:61-64 (registration)The 'close' tool (aliased as browser_close) is registered by being included in the default export array of common tools.export default [ close, resize ];