Skip to main content
Glama
cloudflare

Cloudflare Playwright MCP

Official
by cloudflare

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
NameRequiredDescriptionDefault
urlNoThe URL to navigate to in the new tab. If not provided, the new tab will be blank.

Implementation Reference

  • 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 }; },
  • 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', },
  • 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), ];

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

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