browser_tab_new
Open a new browser tab with a specified URL in Playwright MCP, enabling structured web page interactions for browser automation tasks.
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)Handler function that executes the tool logic: opens a new browser tab and navigates to the provided URL if specified.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)Input schema and metadata for the browser_tab_new tool.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)Module export that registers the newTab tool factory (browser_tab_new) among tab tools.export default (captureSnapshot: boolean) => [ listTabs, newTab(captureSnapshot), selectTab(captureSnapshot), closeTab(captureSnapshot), ];