Skip to main content
Glama
cloudflare

Cloudflare Playwright MCP

Official
by cloudflare

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

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

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