browser_tab_list
Retrieve a list of open browser tabs for web automation and testing with Playwright MCP, enabling structured accessibility interactions without screenshots.
Instructions
List browser tabs
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_tab_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tabs.ts:20-35 (registration)Full definition and registration of the 'browser_tab_list' tool, including schema, handler function, and capability.
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/tabs.ts:31-34 (handler)The handler function for 'browser_tab_list' which ensures tab context and sets response to include tabs.
handle: async (context, params, response) => { await context.ensureTab(); response.setIncludeTabs(); }, - src/tools/tabs.ts:23-29 (schema)Schema definition for 'browser_tab_list' tool: no input parameters, readOnly type.
schema: { name: 'browser_tab_list', title: 'List tabs', description: 'List browser tabs', inputSchema: z.object({}), type: 'readOnly', },