Skip to main content
Glama

browser_tab_new

Create a new browser tab with a specified URL using Playwright MCP. Automate web page navigation through browser automation without requiring screenshots or visual models.

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 that implements the core logic of the 'browser_tab_new' tool: opens a new browser tab and optionally navigates to the specified URL.
    handle: async (context, params) => { await context.newTab(); if (params.url) await context.currentTabOrDie().navigate(params.url); const code = [ `// <internal code to open a new tab>`, ]; return { code, captureSnapshot, waitForNetwork: false }; },
  • The schema definition for the 'browser_tab_new' tool, including name, title, description, input schema using Zod, and type.
    schema: { name: 'browser_tab_new', title: 'Open a new tab', description: 'Open a new tab', inputSchema: z.object({ url: z.string().optional().describe('The URL to navigate to in the new tab. If not provided, the new tab will be blank.'), }), type: 'readOnly', },
  • Export of the tabs tools array, which registers 'browser_tab_new' via newTab(captureSnapshot) for use in snapshotTools and visionTools.
    export default (captureSnapshot: boolean) => [ listTabs, newTab(captureSnapshot), selectTab(captureSnapshot), closeTab(captureSnapshot), ];
  • src/tools.ts:36-48 (registration)
    Top-level registration of tools in snapshotTools array, including tabs tools (which contain browser_tab_new).
    export const snapshotTools: Tool<any>[] = [ ...common(true), ...console, ...dialogs(true), ...files(true), ...install, ...keyboard(true), ...navigate(true), ...network, ...pdf, ...screenshot, ...snapshot, ...tabs(true),
  • src/tools.ts:54-69 (registration)
    Top-level registration of tools in visionTools array, including tabs tools (which contain browser_tab_new).
    export const visionTools: Tool<any>[] = [ ...common(false), ...console, ...dialogs(false), ...files(false), ...install, ...keyboard(false), ...navigate(false), ...network, ...pdf, ...tabs(false), ...testing, ...video, ...vision, ...wait(false), ];

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

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