Skip to main content
Glama
AbyvargheseMandapathel

Selenium MCP Server

switch_frame

Switch to an iframe, parent frame, or default document to interact with elements inside frames. Specify the target and use a selector or frame index when needed.

Instructions

Switch execution context to an iframe, parent frame, or default document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesFrame target to switch to
selectorNoSelector of iframe element (when target is "element")
strategyNoStrategy to find element. Default: csscss
frameIndexNoIndex of the frame (when target is "index")
Install Server

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are present, so the description bears the full burden. 'Switch execution context' is accurate but does not disclose that the switched context persists for subsequent commands, must be reset, or how failures are handled. This is a meaningful gap for a state-changing browser automation tool.

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?

A single, front-loaded sentence with no filler. Every word contributes to the core behavior, and the main target types are listed compactly.

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

Completeness3/5

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

The schema covers the conditional parameters well (selector for 'element', frameIndex for 'index'), but the overall definition lacks key stateful context: it does not state that the context persists, that 'default' resets to the main document, or any behavior on invalid targets. Adequate but incomplete for a stateful tool with no output schema.

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%, so the schema already documents all four parameters and their enums. The tool description adds no extra parameter semantics, which is acceptable under the baseline.

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?

States a specific operation, 'switch execution context', with explicit target classes ('iframe, parent frame, or default document'). This clearly differentiates it from sibling navigation and element tools, which do not manage frame context.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool, prerequisites (e.g., an iframe must exist), or when to return to the default context. It doesn't reference alternatives or exclusions, leaving the agent to infer usage.

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

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/AbyvargheseMandapathel/Selenium-MCP-Server'

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