Skip to main content
Glama

ie_switch_window

Sets which IE mode window other tools act on, so pop-ups and modal dialogs can be targeted by handle, title, or main window, then switches back after the window closes.

Instructions

Make a driver window the one the other tools act on (a pop-up from window.open, or a showModalDialog window). Give exactly one of: handle (a driver_handle from ie_windows), title_contains (case-insensitive part of the window's document title) or main=true (the session's first window). Returns the new window's title and URL. Switch back with main=true when you are done: after a window closes the driver has no current window. Alternative that needs no switching: pass target="hwnd:" to the other tools.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ie_switch_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
mainNo
handleNo
title_containsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.8/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 well: it discloses that this is stateful session mutation, that the driver loses its current window after a close, and what is returned (new window's title and URL). It does not say what happens when no window matches, or how ambiguity is resolved if title_contains matches several windows — the main remaining behavioral gap for a state-changing selector 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?

Front-loads what the tool does, then the parameter contract, then the return value, then lifecycle and the no-switching alternative — a logical progression with no filler. Every clause carries information an agent needs; even the closing alternative-route sentence prevents an unnecessary call.

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?

Three parameters with zero schema coverage, no annotations and no output schema, yet the description covers all parameters, the return value, the stateful side effects, and the recommended cleanup. Nothing material for correct invocation is left to inference.

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 entirely, and it does: handle is tied to a driver_handle from ie_windows, title_contains is defined as case-insensitive substring of the window's document title, and main is defined as the session's first window. It also adds a mutual-exclusivity rule ('Give exactly one of') that the flat schema does not encode, which is real semantic value beyond the input schema.

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 verb and resource: 'Make a driver window the one the other tools act on', immediately clarifying that this tool sets ambient state rather than reading or mutating a window. The parenthetical examples (pop-up from window.open, showModalDialog) and the named sibling reference (driver_handle from ie_windows) make it distinguishable from ie_windows and ie_close_window at a glance.

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?

Gives explicit when-to-use triggers (pop-ups, modal dialogs), an explicit when-not alternative ('pass target="hwnd:<n>" to the other tools' — no switching needed), and lifecycle guidance ('Switch back with main=true when you are done: after a window closes the driver has no current window'). Both the alternative route and the required follow-up action are spelled out rather than implied.

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