Skip to main content
Glama

browser_close

Automatically closes web pages after completing accessibility scans to ensure efficient resource management during WCAG compliance testing with MCP Accessibility Scanner.

Instructions

Close the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the browser_close tool logic. It closes the browser context via context.closeBrowserContext(), includes tabs in the response, 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 (no parameters), and readOnly type.
    schema: { name: 'browser_close', title: 'Close browser', description: 'Close the page', inputSchema: z.object({}), type: 'readOnly', },
  • Tool definition and registration using defineTool, including capability, schema, and handler. Exported in the module's default array.
    const close = defineTool({ capability: 'core', schema: { name: 'browser_close', title: 'Close browser', description: 'Close the page', inputSchema: z.object({}), type: 'readOnly', }, handle: async (context, params, response) => { await context.closeBrowserContext(); response.setIncludeTabs(); response.addCode(`await page.close()`); }, });
  • src/tools.ts:38-56 (registration)
    Aggregation of all tools, including those from common.ts (which contains browser_close), into allTools array for use in the backend.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...form, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ...verify, ];

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/JustasMonkev/mcp-accessibility-scanner'

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