browser_tab_select
Select a specific browser tab by its index number to manage multiple open tabs during web automation tasks.
Instructions
Select a tab by index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | The index of the tab to select |
Implementation Reference
- src/tools/tabs.ts:50-53 (handler)The handler function for the 'browser_tab_select' tool. It selects the tab at the given index using the context and includes a snapshot in the response.handle: async (context, params, response) => { await context.selectTab(params.index); response.setIncludeSnapshot(); },
- src/tools/tabs.ts:40-48 (schema)Schema definition for the 'browser_tab_select' tool, including name, title, description, input schema requiring an 'index' number, and type 'readOnly'.schema: { name: 'browser_tab_select', title: 'Select a tab', description: 'Select a tab by index', inputSchema: z.object({ index: z.number().describe('The index of the tab to select'), }), type: 'readOnly', },
- src/tools/tabs.ts:96-100 (registration)Registration of the 'browser_tab_select' tool (as 'selectTab') by exporting it in the default array of tools from tabs.ts.export default [ listTabs, newTab, selectTab, closeTab,