Skip to main content
Glama

browser_tab_list

Retrieve a list of active browser tabs for efficient management and navigation during web automation tasks with Playwright MCP.

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 is available in the context and sets the response to include tabs.
    handle: async (context, params, response) => { await context.ensureTab(); response.setIncludeTabs(); },
  • Schema definition for the 'browser_tab_list' tool, including 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', },
  • Local registration of the 'browser_tab_list' tool via defineTool, including capability, schema, and handler.
    const listTabs = defineTool({ capability: 'core-tabs', schema: { name: 'browser_tab_list', title: 'List tabs', description: 'List browser tabs', inputSchema: z.object({}), type: 'readOnly', }, handle: async (context, params, response) => { await context.ensureTab(); response.setIncludeTabs(); }, });
  • src/tools.ts:36-52 (registration)
    Global registration: includes tabs tools (with 'browser_tab_list') in the allTools export array.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ];

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/nzjami/mcpPlaywright'

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