Skip to main content
Glama

switch_tab

Activate a specific browser tab by its zero-based index within an Assertify session, so agents can continue interacting with the intended page.

Instructions

Make tab index (0-based) the active tab. New tabs/popups become active automatically.

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": {
      "session_id": "<session_id>",
      "index": "<index>"
    },
    "name": "switch_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true), so the bar is lower. The description contributes the non-obvious fact that new tabs/popups auto-activate, which changes calling behavior, but it says nothing about out-of-range indices, whether the session must be focused, or what happens on failure.

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 short sentences, zero filler, with the core action front-loaded and the caveat about auto-activation following. Nothing could be removed without losing information.

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 two-parameter browser-control tool with no output schema and informative annotations, this is close to sufficient: the action, the indexing convention, and the auto-activation caveat are all present. The only meaningful gap is the unexplained `session_id` and unspecified behavior for an invalid index.

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 0%, so the description must carry parameter meaning. It does clarify that `index` is 0-based, which the schema's bare 'Index' integer title does not convey, but `session_id` receives no explanation at all.

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 and resource: make tab `index` the active tab. It also disambiguates the index semantics as 0-based, which an agent could otherwise get wrong. It does not explicitly contrast with sibling navigation tools like `navigate` or `back`, keeping it just short of a 5.

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 note that new tabs/popups become active automatically implies the agent does not need to switch to freshly opened tabs, which is real usage guidance. However, there is no explicit statement of when to call this versus `back`, `navigate`, or other tab-affecting siblings, and no prerequisites or failure conditions.

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