Skip to main content
Glama

browser_close

Close active web pages in Playwright MCP to end interactions and free up resources, ensuring efficient browser session management.

Instructions

Close the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the browser_close tool logic: closes the browser context, sets tabs inclusion, and adds code 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.
    name: 'browser_close', title: 'Close browser', description: 'Close the page', inputSchema: z.object({}), type: 'readOnly', },
  • src/tools.ts:36-52 (registration)
    Higher-level registration of tools where browser_close (from common.ts) is included via spread operator at line 37.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ];

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/maywzh/playwright-mcp'

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