Skip to main content
Glama

browser_switch_tab

Switch to a specific browser tab by its target ID or URL substring. Returns the session ID for subsequent actions, enabling precise tab management during automated browser workflows.

Instructions

Switch to tab by targetId or URL substring. Returns the sessionId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return value ('Returns the sessionId') but does not disclose what happens if the target is not found, whether the switch is synchronous, or whether the sessionId refers to the new tab's session. The behavior of matching by URL substring is ambiguous (e.g., case sensitivity, partial match).

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?

The description is a single concise sentence that front-loads the action and target format. It earns its place by adding the URL substring option and the return value, though it could be slightly more structured.

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?

For a tool with no annotations, no output schema, and a single parameter with 0% schema coverage, the description is too thin. It does not explain error behavior, how to obtain a targetId (e.g., via browser_list_tabs), or what the sessionId is used for. An agent would likely need to experiment or consult other tools to use this correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It does clarify that `target` can be a `targetId` or URL substring, which adds meaning beyond the bare schema. However, it does not explain how to distinguish a targetId from a URL substring, what format a targetId takes, or how the substring matching works.

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?

The description states a specific verb ('Switch') and resource ('tab'), and identifies the two accepted target formats: `targetId` or URL substring. It clearly distinguishes this from sibling tools like browser_new_tab and browser_close_tab, though it doesn't explicitly name them.

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 when to use this tool: when the agent needs to change the active tab and has a targetId or URL substring. However, it does not explicitly state when not to use it or mention alternatives like browser_list_tabs for finding the targetId or browser_current_tab for checking the active tab.

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