Skip to main content
Glama
cloudflare

Cloudflare Playwright MCP

Official
by cloudflare

browser_tab_list

Read-only

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),
    ];
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide key behavioral hints (readOnlyHint: true, destructiveHint: false, openWorldHint: true), indicating this is a safe, read-only operation that might return varying results. The description adds no additional behavioral context beyond the basic action, such as what information is listed or any limitations, but it doesn't contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loading the core action and resource without any wasted text. Every word earns its place, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, annotations covering safety), the description is adequate but minimal. It lacks details on output format or usage context, which could be helpful since there's no output schema, but it meets the basic requirement for a straightforward list operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, but it also doesn't explain any implicit inputs or context, keeping it at a baseline level for this scenario.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List browser tabs' clearly states the verb ('List') and resource ('browser tabs'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'browser_tab_close' or 'browser_tab_new' beyond the obvious action difference, so it doesn't reach the highest level of specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention context, prerequisites, or exclusions, such as whether it lists all tabs or specific ones, or how it relates to other tab-related tools like 'browser_tab_select'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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