browser_tab_list
Track and manage open browser tabs using Cloudflare Playwright MCP, enabling efficient browser testing and tab control for automated navigation and interaction.
Instructions
List browser tabs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tabs.ts:31-44 (handler)The handler function for the 'browser_tab_list' tool. Ensures a tab exists and returns a result override with the list of tabs in markdown format via context.listTabsMarkdown().
handle: async context => { await context.ensureTab(); return { code: [`// <internal code to list tabs>`], captureSnapshot: false, waitForNetwork: false, resultOverride: { content: [{ type: 'text', text: await context.listTabsMarkdown(), }], }, }; }, - src/tools/tabs.ts:23-29 (schema)The Zod schema definition for the tool, specifying name, title, description, empty input schema, and readOnly type.
schema: { name: 'browser_tab_list', title: 'List tabs', description: 'List browser tabs', inputSchema: z.object({}), type: 'readOnly', }, - src/tools/tabs.ts:129-134 (registration)Module-level registration: exports an array of tab-related tools including the listTabs tool (browser_tab_list).
export default (captureSnapshot: boolean) => [ listTabs, newTab(captureSnapshot), selectTab(captureSnapshot), closeTab(captureSnapshot), ]; - src/tools.ts:35-50 (registration)Main registration in snapshotTools array, which spreads the tabs tools (including browser_tab_list).
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)Main registration in visionTools array, which spreads the tabs tools (including browser_tab_list).
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), ];