Skip to main content
Glama
ChristofMilius

mcp-agent-playwright

browser_tab_switch

Switch to an open browser tab by its index from the tab list to set it as the active page.

Instructions

Switch to an existing tab by its index from browser_tabs().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesTab index from browser_tabs(), 0-based.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden, but it only conveys that the tool switches to an existing tab. It does not disclose behavior on invalid index, whether browser focus changes, or return value; however, 'switch to' implies selection/activation, providing minimal guidance.

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?

One sentence with no filler, front-loaded with the action verb and resource, and efficiently references the tab source. Every word earns its place.

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 single-parameter tool with an output schema, the description is mostly complete. It lacks edge-case or error behavior context, but the schema and simple operation reduce the need for extensive prose.

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?

Schema description coverage is 100% and already documents the index as 0-based and sourced from browser_tabs(). The description repeats this without adding new semantic detail beyond what the schema provides.

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') with a clear resource ('existing tab') and source ('by its index from browser_tabs()'). It plainly distinguishes this tool from siblings like browser_tab_new and browser_tab_close by emphasizing 'existing'.

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?

It states the key precondition: obtain the index from browser_tabs(). This implies the workflow without explicitly naming alternatives or when-not-to-use conditions, though 'existing tab' rules out new-tab creation.

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