browser_tab_new
Open a new browser tab with a specified URL or leave it blank for testing and navigation using automated browser control on the Cloudflare Playwright MCP server.
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 handle function implementing the browser_tab_new tool logic: opens a new tab and navigates to the optional URL provided.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)Schema definition for browser_tab_new tool, specifying input (optional url) and metadata.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)Registration of the browser_tab_new tool (via newTab factory) in the exported array of tabs tools.export default (captureSnapshot: boolean) => [ listTabs, newTab(captureSnapshot), selectTab(captureSnapshot), closeTab(captureSnapshot), ];
- src/tools.ts:35-50 (registration)Inclusion of tabs tools (including browser_tab_new with captureSnapshot=true) in snapshotTools array.export const snapshotTools: Tool<any>[] = [ ...common(true), ...console, ...dialogs(true), ...files(true), ...install, ...keyboard(true), ...navigate(true), ...network, ...pdf, ...screenshot, ...snapshot, ...tabs(true), ...testing, ...wait(true), ];
- src/tools.ts:52-66 (registration)Inclusion of tabs tools (including browser_tab_new with captureSnapshot=false) in visionTools array.export const visionTools: Tool<any>[] = [ ...common(false), ...console, ...dialogs(false), ...files(false), ...install, ...keyboard(false), ...navigate(false), ...network, ...pdf, ...tabs(false), ...testing, ...vision, ...wait(false), ];