Skip to main content
Glama

session_switch_tab

Bring an open tab in a running browser session to the front and make it active. Provide the identity name and the tab index from session_tabs to switch focus.

Instructions

Bring one of the session's open tabs to the front and make it the active one.

Requires a session opened with profile_start first. Get index from session_tabs — indices are only valid as of that snapshot, a tab opened or closed since shifts them.

Args: name: identity name, exactly as profiles_list reports it. index: the tab's index, from session_tabs.

Returns {index, url} for the now-active tab. Fails with a readable message if the session is not open (409 — call profile_start first), the identity does not exist (404), or the index is out of range (422).

Input Schema

NameRequiredDescriptionDefault
nameYes
indexYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it well: it discloses the returned shape ({index, url}), the three failure modes with their HTTP codes (409 not-open, 404 unknown identity, 422 out-of-range index), and the snapshot staleness hazard. It stops short of saying whether the switch itself has side effects on the page (e.g. load/focus events) or how it behaves if the index is stale but still in range.

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?

Front-loaded with the one-line purpose, then prerequisite, then a compact Args/Returns block, then failure modes. Every sentence adds information the agent cannot get from the schema; nothing is redundant filler.

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

Completeness5/5

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

No output schema and no annotations, so the description must cover return value, preconditions, and errors on its own — and it does, naming the exact response object and each error code. For a two-parameter session tool this leaves nothing an agent needs to call it correctly.

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

Parameters5/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 supply all parameter meaning, and it does: `name` is the identity name exactly as profiles_list reports it, and `index` is the tab index obtained from session_tabs. It also documents the validity window of `index`, which the bare integer type cannot convey.

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 concrete verb and resource: bring one of the session's open tabs to the front and make it active. That clearly separates it from session_tabs (which enumerates) but it never names the neighboring navigation tool session_goto, so an agent must infer that distinction from the sibling list.

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?

Explicitly states the prerequisite (a session opened with profile_start) and where the `index` value must come from (session_tabs), plus the crucial ordering caveat that indices are only valid as of that snapshot and shift when tabs open or close. That is exactly the when-and-how guidance an agent needs to avoid a wrong-tab invocation.

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