Skip to main content
Glama

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
NameRequiredDescriptionDefault
indexYesThe index of the tab to select

Implementation Reference

  • 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(); },
  • 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', },
  • 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,

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/maywzh/playwright-mcp'

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