Skip to main content
Glama

switch_window

Switch the active window in Electron apps to control different application windows for automated testing or interaction tasks.

Instructions

Make a different BrowserWindow the "current" one that subsequent tools drive. Pass index (from windows_list) or titleMatch (substring of window title). The driver will focus the target window and route all future click/type/eval calls to it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo
titleMatchNo
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 key behavioral traits: it focuses the target window and routes future calls to it, implying state change and persistence. However, it doesn't mention error handling (e.g., if no window matches) or performance aspects, leaving some gaps.

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 with the purpose, followed by parameter guidance and behavioral effects in two concise sentences. Every part adds value without redundancy, making it efficient and easy to parse.

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 the tool's moderate complexity (state-changing with 2 parameters), no annotations, and no output schema, the description is mostly complete. It covers purpose, usage, parameters, and effects, but lacks details on errors or edge cases, which could be helpful for robust agent operation.

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 compensate. It adds crucial meaning: 'index' is from windows_list, and 'titleMatch' is a substring of the window title. This clarifies how to use the parameters effectively, going beyond the bare schema types.

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 clearly states the verb ('Make... the current one') and resource ('BrowserWindow'), specifying that it changes which window subsequent tools will target. It distinguishes from siblings like 'windows_list' (which lists windows) and 'click' (which performs actions within the current window).

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 this tool: to switch the current window for driving subsequent actions. It provides alternatives by specifying two parameter options ('index' from windows_list or 'titleMatch'), guiding the agent on how to select the target window. This is clear and actionable.

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/mesomya/electron-driver'

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