Skip to main content
Glama

window

Destructive

Control desktop windows: list visible windows, displays, and screen size; focus, resize, maximize, minimize, restore, or close windows; open apps, files, and URLs; switch browser tabs.

Instructions

Windows, apps and displays at the OS level: find, open, focus and arrange windows. For what is INSIDE a window use accessibility; for a web page's DOM use browser. Read-only: list (every visible window: title, process, pid, screen bounds), active (the focused window), list_displays (monitors with bounds and DPI), screen_size. Arrange — target with processName, processId or title (substring); none given = the foreground window: focus (bring to front, keeps it maximized), maximize, minimize, restore, resize (x, y, width, height in screen px — the units list and accessibility report; space:"image" for screenshot pixels; omitted fields are kept). close asks the app to close, like its ✕: the app may prompt to save and unsaved work can be lost, so it needs the user's confirmation (safety gate). Open: open_app (name; launches or focuses, and says when no window has appeared yet), open_file (path, in its default app — an .exe/.app is executed), open_url (url, in the default browser), navigate (url, in clawdcursor's own browser for DOM work — same as browser navigate), switch_tab (index 1–9, or direction next/previous; a keyboard shortcut in the focused browser). Returns text: the window list, or one line saying what happened; a failure says why (no matching window, refused by the safety gate).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoNew X (top-left origin, logical px)
yNoNew Y (top-left origin, logical px)
urlNohttps:// or http:// URL
nameNoApplication name (e.g. "notepad", "calc", "mspaint", "Outlook", "Chrome")
pathNoAbsolute filesystem path
indexNoJump to tab N (1-based, 1-9). If omitted, direction must be provided.
spaceNo
titleNoWindow title substring to match
widthNoNew width in logical px
actionYesWhich sub-action to perform. See this tool's description for the enum of valid values.
heightNoNew height in logical px
directionNoCycle "next" or "previous". Ignored when `index` is given.
processIdNoProcess ID to focus
processNameNoProcess name to focus (e.g. "notepad", "msedge")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.16

TDQS

A5/5.0
Behavior5/5

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

The annotations already flag this as non-read-only, open-world, non-idempotent, and potentially destructive, but the description adds important specifics: `close` may trigger save prompts and lose unsaved work, requires user confirmation through a safety gate, and failures explain why. It also discloses that `open_file` executes executables and that `open_app` reports when no window has appeared yet.

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 dense but front-loaded and appropriately sized for a 15-action tool. Each sentence carries necessary routing or behavioral information, and the read-only / arrange / open grouping gives the agent a usable structure without filler.

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?

There is no output schema, but the description explains the return format as text: a window list or a one-line result, with failure reasons such as no matching window or safety-gate refusal. Combined with the annotations and parameter coverage, it contains everything an agent needs to call the tool correctly.

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?

Although schema coverage is high at 93%, the description adds substantial semantic detail beyond the schema: window targeting works via `processName`, `processId`, or a `title` substring, and defaults to the foreground window when none is supplied. It also clarifies resize coordinates and units, the `space:"image"` alternative, omitted-field preservation, and the 1-9 tab index / next-previous direction behavior.

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 precise verb-and-resource statement: OS-level windows, apps, and displays, with find/open/focus/arrange operations. It explicitly distinguishes this tool from `accessibility` (inside a window) and `browser` (web DOM), so an agent can select it confidently against its siblings.

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 gives explicit alternatives and boundaries: use `accessibility` for what is inside a window, and `browser` for a web page's DOM. It also routes the agent through the sub-actions with their intended use cases, including targeting rules for arranging and the distinction between `open_url`, `navigate`, and `switch_tab`.

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

Deploy Server

Other Tools