browser_tab_list
Retrieve a list of open browser tabs to monitor or manage active web pages using Playwright MCP's structured browser automation.
Instructions
List browser tabs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tabs.ts:31-44 (handler)Handler function that executes the browser_tab_list tool. Ensures a tab is available and returns a markdown list of tabs via context.listTabsMarkdown() in a result override.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:24-29 (schema)Input/output schema for the browser_tab_list tool: no input parameters required, read-only type.name: 'browser_tab_list', title: 'List tabs', description: 'List browser tabs', inputSchema: z.object({}), type: 'readOnly', },
- src/tools/tabs.ts:129-134 (registration)Local registration of the listTabs tool (browser_tab_list) in the exported array of tabs tools.export default (captureSnapshot: boolean) => [ listTabs, newTab(captureSnapshot), selectTab(captureSnapshot), closeTab(captureSnapshot), ];
- src/tools.ts:35-50 (registration)Global registration where tabs tools (including browser_tab_list) are included via ...tabs(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)Global registration where tabs tools (including browser_tab_list) are included via ...tabs(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), ];