Skip to main content
Glama

switch_tab

Switch browser focus to any open tab by its index to access pages opened by links or popups without re-navigating.

Instructions

Switch the browser focus to a different open tab by its zero-based index. Returns the tab count and a page_state object reflecting the switched-to tab's content (headings, landmarks, links). Use to access pages opened by link targets, popups, or forked sub-agents without re-navigating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoZero-based tab index to switch to (0 = first tab). Use the tab count from previous responses to determine valid indices.
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It states it switches focus and returns tab count and page_state. It does not disclose failure modes (e.g., invalid index) or side effects on browser history. This is adequate but not exhaustive.

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?

Two sentences: first defines action and output, second provides usage guidance. No unnecessary words; efficiently communicates purpose and usage.

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

Completeness4/5

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

For a simple tool with one parameter and no output schema, the description covers purpose, usage, parameter semantics, and return value. It could mention what happens on invalid index, but given simplicity, it is sufficiently complete.

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

Parameters4/5

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

The single parameter `index` is fully described in the schema (100% coverage). The tool description adds value by linking the index to 'tab count from previous responses,' aiding correct invocation. This goes beyond the schema's basic description.

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 clearly states the action ('Switch the browser focus'), identifies the resource ('different open tab'), and specifies the method ('by its zero-based index'). It differentiates from siblings like `navigate` and `go_back` by focusing on tab switching without re-navigation.

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

Usage Guidelines4/5

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

The description explicitly says when to use this tool: 'to access pages opened by link targets, popups, or forked sub-agents without re-navigating.' It does not state when not to use it or list alternatives, but the context of sibling tools provides the necessary differentiation.

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/Mingye-Lu/AgenticCrawler'

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