Skip to main content
Glama
seleniumbase

SeleniumBase MCP

Official

switch_to_tab

Switch to any open browser tab by providing its index from get_tabs, so you can interact with the correct page during automation.

Instructions

Switch to a tab by its index (as returned by get_tabs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It states the core action (switching to a tab) and the index source, but omits possible edge-case behaviors like invalid-index handling, whether the tab gains focus, or any side effects. This is minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. The core action and the parameter source are front-loaded, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description references get_tabs to define the index, but get_tabs is not among the listed sibling tools (only get_tabs_count is present). This leaves the agent without a clear way to obtain valid tab indices. It also does not cover error conditions or edge cases. Given the tool's simplicity and existing output schema, this is a notable completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only provides the parameter name and type (integer), with no description. The description adds meaning by defining the tab_index as the index returned by get_tabs, which goes beyond the schema. However, it does not explicitly clarify zero- or one-based indexing, though referencing get_tabs implies compatibility.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Switch') and resource ('tab'), and specifies the input basis ('by its index as returned by get_tabs'). This clearly distinguishes it from siblings like switch_to_newest_tab, open_new_tab, and close_active_tab.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used when a tab index from get_tabs is available, but it does not explicitly state when to use this over alternatives such as switch_to_newest_tab or open_new_tab. No exclusions or when-not guidance are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/seleniumbase/SeleniumBase'

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