Skip to main content
Glama

browser_switch_to_popup

Switch to the most recently opened popup or new tab. Waits for the new window, makes it active, and returns its ARIA snapshot.

Instructions

Switch the active page to the most recently opened popup or new tab.

    Use this after triggering an OAuth / SSO flow (Google Sign-In, GitHub OAuth,
    etc.) or any action that calls window.open() or opens a target=_blank link.
    The tool waits up to timeout_ms for the new window to open, then makes it the
    active page and returns its ARIA snapshot. To go back to the original tab
    afterward, use browser_tabs(action='select', index=0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo
timeout_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool waits up to timeout_ms for the new window, makes it active, and returns its ARIA snapshot. It doesn't describe behavior on timeout or error, but the core behavioral traits are transparent.

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 front-loaded with the main action and reasonably concise. The second paragraph could be slightly trimmed, but overall it is well-structured and every sentence adds value.

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?

Given that an output schema exists, the description need not detail the return format. It states the tool returns an ARIA snapshot, which is sufficient. It lacks details on error handling or timeout behavior, but the overall contextual completeness is high for a focused tool.

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 add meaning. It implicitly defines timeout_ms as the wait duration, but does not explain session_id. Parameter names are somewhat self-explanatory, but the description could explicitly define both parameters to compensate for the schema gap.

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 the active page to') and identifies the resource ('the most recently opened popup or new tab'). It clearly distinguishes itself from sibling tools like browser_tabs and browser_navigate by specifying use cases (OAuth/SSO flows, window.open, target=_blank).

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?

The description provides explicit guidance on when to use (after triggering OAuth/SSO flows or actions that open new windows/tabs) and mentions an alternative for returning to the original tab (browser_tabs(action='select', index=0)). This helps the agent choose between sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Evil-Bane/eyebrowse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server