Skip to main content
Glama

window

Manage browser tabs and windows: list handles, switch tabs, open or close windows, and resize the viewport for responsive or mobile testing.

Instructions

Manage browser tabs and windows, and resize the viewport. list = all window handles plus the current one; switch = go to a handle from list; switch_latest = go to the newest tab/window (e.g. after a link opened a new tab); new_tab / new_window = open a blank one and switch to it; close = close the current one (then switch to another handle). resize = set the viewport (page area) to width x height for responsive or mobile testing, e.g. 390x844 phone, 768x1024 tablet, 1920x1080 desktop (exact phone sizes use device emulation on Chrome/Edge); maximize = maximize the window. Returns window handles, or the resulting window and viewport sizes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoViewport width in CSS pixels for resize (e.g. 390 phone, 768 tablet, 1920 desktop). Required for resize.
actionYesWhat to do: list | switch | switch_latest | new_tab | new_window | close | resize | maximize.
handleNoWindow handle to switch to, as returned by action list. Required for switch; ignored otherwise.
heightNoViewport height in CSS pixels for resize (e.g. 844 phone, 1024 tablet, 1080 desktop). Required for resize.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.3.0
    • addedInput schema / properties / action / description
      Added value: +"What to do: list | switch | switch_latest | new_tab | new_window | close | resize | maximize."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "switch",
      -  "switch_latest",
      -  "new_tab",
      -  "new_window",
      -  "close"
      -]New value: +[
      +  "list",
      +  "switch",
      +  "switch_latest",
      +  "new_tab",
      +  "new_window",
      +  "close",
      +  "resize",
      +  "maximize"
      +]
    • addedInput schema / properties / handle / description
      Added value: +"Window handle to switch to, as returned by action list. Required for switch; ignored otherwise."
    • addedInput schema / properties / height
      Added value: +{
      +  "description": "Viewport height in CSS pixels for resize (e.g. 844 phone, 1024 tablet, 1080 desktop). Required for resize.",
      +  "maximum": 4320,
      +  "minimum": 240,
      +  "type": "integer"
      +}
    • addedInput schema / properties / width
      Added value: +{
      +  "description": "Viewport width in CSS pixels for resize (e.g. 390 phone, 768 tablet, 1920 desktop). Required for resize.",
      +  "maximum": 7680,
      +  "minimum": 320,
      +  "type": "integer"
      +}
  2. First observedv0.1.2

TDQS

A4.4/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 behavioral burden and does well: it states side effects (new_tab/new_window open a blank one and switch to it; close closes the current one and then switches to another handle), the return values ('window handles, or the resulting window and viewport sizes'), and the Chrome/Edge-only caveat for exact phone sizes. It does not state permissions or rate limits, but nothing suggests those apply.

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 top-level scope and then a tight action-by-action breakdown. Every clause earns its place; there is no filler or repetition.

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?

For an 8-action tool with no output schema, the description covers the main behavior, side effects, and return shape. It is slightly short of complete because it does not explain what happens if switch is called with a stale handle or whether resize affects only the current window.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by giving concrete action-to-parameter mappings (width/height for resize, handle for switch) and device-emulation guidance (exact phone sizes use device emulation on Chrome/Edge) that the schema does not contain.

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 opens with a specific verb+resource ('Manage browser tabs and windows, and resize the viewport') and then enumerates every action with a precise definition, so an agent can distinguish this from siblings like frame or alert that also affect context.

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

Usage Guidelines4/5

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

Each action enum value is explained with a when-to-use condition (e.g. 'switch = go to a handle from list', 'switch_latest = go to the newest tab/window (e.g. after a link opened a new tab)'), which is strong. It does not name alternatives, but this tool has no direct sibling for tab/window management, so the gap is minor.

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