Skip to main content
Glama

Switch Tab

switch_tab

Focuses a specified browser tab so visual capture works, since other tools operate on background tabs.

Instructions

Focus a tab. Needed for visual capture; other tools work on background tabs.

Ex: switch_tab('t1') → {"focused":"t1"}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tab_id": "<tab_id>"
    },
    "name": "switch_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose the key trait that background tabs work for other tools, making focus conditional for visual capture. It also shows an example return, though it does not cover invalid tab IDs or side effects.

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 front-loaded, uses two short sentences plus a useful example, and every sentence adds value. There is no redundant or filler text.

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 one-parameter focus tool with an output schema, the description covers purpose, usage condition, and example return. The main remaining gap is how to source or format the tab_id, but the overall definition is operationally adequate.

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%, and the description only demonstrates an example value ('t1') without explaining what a tab_id is, how to obtain one, or what format it uses. It adds an example but does not compensate for the missing parameter documentation.

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 states a specific verb and resource: 'Focus a tab.' It also distinguishes the tool from siblings by noting that other tools work on background tabs, so only visual capture needs this focus step.

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

Usage Guidelines5/5

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

It explicitly states when to use the tool ('Needed for visual capture') and when it is not needed ('other tools work on background tabs'). This gives an agent a clear selection rule without needing to inspect sibling schemas.

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