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
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | The URL to navigate to in the new tab. If not provided, the new tab will be blank. |
Implementation Reference
- src/tools/tabs.ts:87-100 (handler)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 }; },
- src/tools/tabs.ts:77-85 (schema)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', },
- src/tools/tabs.ts:129-134 (registration)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), ];