Skip to main content
Glama

switch_tab

Switch the active browser tab using an index, browser-derived ID, or name substring to target the correct page during browser automation.

Instructions

Switch tab by index, browser-derived id, or name substring (see status). Accepts 'tab'/'index'.

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": "switch_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNo
indexNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the accepted addressing forms and points to status for ids, which is helpful. It says nothing about failure behavior for a non-matching tab, ambiguity when a name substring matches multiple tabs, or whether the switch persists across later calls.

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

Conciseness4/5

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

A single compact sentence with the verb and modes front-loaded, plus the parameter hint at the end. No filler, though the parenthetical phrasing and trailing "Accepts 'tab'/'index'" read slightly telegraphic.

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

Completeness3/5

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

The tool is simple, has an output schema so return values need no explanation, and all parameters are optional. Still, for an unannotated tool the description leaves open precedence between the two parameters and behavior on a failed or ambiguous match.

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?

Schema coverage is 0% and the schema itself is just an untyped anyOf(integer|string|null), so the description does real work by explaining that 'tab' accepts an index, a browser-derived id, or a name substring. It stops short of defining precedence when both 'tab' and 'index' are supplied or the matching rules for substrings.

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

Purpose4/5

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

States a specific verb and resource ("Switch tab") and enumerates the three accepted addressing modes: index, browser-derived id, and name substring. An agent can distinguish it from siblings like new_tab and close_tab, though it never explicitly says the switch makes the tab active for subsequent operations.

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 parenthetical "(see status)" usefully routes the agent to the sibling that presumably lists tabs and their ids, which is genuine when-to-use context. However, there is no guidance on when to prefer this over new_tab/close_tab or what to do when the tab is not found.

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