Skip to main content
Glama

browser_tab_new

Launch a new browser tab with a specified URL to facilitate automated accessibility scans, ensuring WCAG compliance and generating detailed remediation reports.

Instructions

Open a new tab

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoThe URL to navigate to in the new tab. If not provided, the new tab will be blank.

Implementation Reference

  • The handler function for the 'browser_tabs' tool. For action 'new', it calls context.newTab() to create a new browser tab and includes tabs in the response.
    handle: async (context, params, response) => { switch (params.action) { case 'list': { await context.ensureTab(); response.setIncludeTabs(); return; } case 'new': { await context.newTab(); response.setIncludeTabs(); return; } case 'close': { await context.closeTab(params.index); response.setIncludeSnapshot(); return; } case 'select': { if (params.index === undefined) throw new Error('Tab index is required'); await context.selectTab(params.index); response.setIncludeSnapshot(); return; } } },
  • The schema definition for the 'browser_tabs' tool, which supports 'new' action to create a new tab.
    schema: { name: 'browser_tabs', title: 'Manage tabs', description: 'List, create, close, or select a browser tab.', inputSchema: z.object({ action: z.enum(['list', 'new', 'close', 'select']).describe('Operation to perform'), index: z.number().optional().describe('Tab index, used for close/select. If omitted for close, current tab is closed.'), }), type: 'destructive', },
  • Core implementation of creating a new tab by calling browserContext.newPage() and updating current tab.
    async newTab(): Promise<Tab> { const { browserContext } = await this._ensureBrowserContext(); const page = await browserContext.newPage(); this._currentTab = this._tabs.find(t => t.page === page)!; return this._currentTab; }
  • src/tools.ts:38-56 (registration)
    Registration of all tools, including the tabs tools (which exports browser_tabs) into the allTools array used by the MCP backend.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...form, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ...verify, ];
  • src/tools.ts:30-30 (registration)
    Import of tabs module containing browser_tabs tool.
    import tabs from './tools/tabs.js';

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