Skip to main content
Glama

window

Destructive

Control desktop applications, focused panes, and displays at the OS level: list, focus, arrange, minimize, close, resize, and open apps, files, or URLs.

Instructions

Windows, apps and displays at the OS level. For what is INSIDE a window use accessibility; for a web page's DOM browser. Read: list (every open app: process, pid, window count; titles and bounds only for windows clawdcursor opened or worked in), active (the focused window), list_displays (monitors, bounds, DPI), screen_size. Arrange (target with processName, processId or a title substring; none = the foreground window): focus, maximize, minimize, restore, resize (x, y, width, height). close asks the app to close, like its ✕: unsaved work can be lost, so ask the user first unless they asked for it. Open: open_app (name; launches or focuses), open_file (path, default app; an .exe/.app is executed), open_url (url, default browser), navigate (url, in clawdcursor's own browser), switch_tab (index 1–9, or direction). Returns text: the window list, or one line saying what happened; a failure says why.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "window"
  }
}

Input 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.
spaceNoresize: "screen" (default) = the units `list` and `accessibility` report; "image" = screenshot pixels.
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. Required: open_app: name; open_file: path; open_url/navigate: url.
expectNoChecks run after the action; a failed check returns DEVIATION. Example: [{"type":"window_title_contains","value":"Inbox"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the text you typed.
heightNoNew height in logical px
directionNoCycle "next" or "previous". Ignored when `index` is given.
processIdNoList only this process's windows, with titles
processNameNoList only this app's windows, with titles (name contains this, any case)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.3.0
    • changedInput schema / properties / processId / description
      Previous value: -"Process ID to focus"New value: +"List only this process's windows, with titles"
    • changedInput schema / properties / processName / description
      Previous value: -"Process name to focus (e.g. \"notepad\", \"msedge\")"New value: +"List only this app's windows, with titles (name contains this, any case)"
  2. Changed2 schema fields changedv2.0.0
    • changedInput schema / properties / expect / description
      Previous value: -"Optional post-conditions to verify after this action (same assertion types as the verify tool: window_title_contains, app_running, element_exists, element_value_contains, clipboard_contains, file_exists, file_contains, ocr_contains, file_changed_since_start). If any FAIL the action returns a DEVIATION and you must adapt. State an OUTCOME you can observe (a window title, a rendered element/chip, a status) — NOT the raw text you typed."New value: +"Checks run after the action; a failed check returns DEVIATION. Example: [{\"type\":\"window_title_contains\",\"value\":\"Inbox\"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the text you typed."
    • changedInput schema / properties / space / description
      Previous value: -""New value: +"resize: \"screen\" (default) = the units `list` and `accessibility` report; \"image\" = screenshot pixels."
  3. Changed2 schema fields changedv1.5.24
    • changedInput schema / properties / action / description
      Previous value: -"Which sub-action to perform. See this tool's description for the enum of valid values."New value: +"Which sub-action to perform. See this tool's description for the enum of valid values. Required: open_app: name; open_file: path; open_url/navigate: url."
    • addedInput schema / properties / expect
      Added value: +{
      +  "description": "Optional post-conditions to verify after this action (same assertion types as the verify tool: window_title_contains, app_running, element_exists, element_value_contains, clipboard_contains, file_exists, file_contains, ocr_contains, file_changed_since_start). If any FAIL the action returns a DEVIATION and you must adapt. State an OUTCOME you can observe (a window title, a rendered element/chip, a status) — NOT the raw text you typed.",
      +  "items": {
      +    "properties": {
      +      "type": {
      +        "enum": [
      +          "window_title_contains",
      +          "app_running",
      +          "element_exists",
      +          "element_value_contains",
      +          "clipboard_contains",
      +          "file_exists",
      +          "file_contains",
      +          "ocr_contains",
      +          "file_changed_since_start"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. First observedv1.5.16

TDQS

A4.4/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is partly covered. The description still adds genuinely non-obvious behavior: `close` behaves like the app's ✕ and can lose unsaved work, an .exe/.app passed to `open_file` is executed, and titles/bounds in `list` are only returned for windows clawdcursor opened or worked in — a significant limitation. Return shape is described textually, which is required here since there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and scope, then grouped by Read/Arrange/Open, with zero filler sentences. It is extremely dense — heavy backtick lists and nested parentheticals — which is efficient but makes it slower to scan for a single-action lookup.

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?

For a 15-parameter, 15-action tool with no output schema, everything an agent needs is present: action inventory, target semantics, side effects, return format and failure signaling ("a failure says why"). No significant gap remains that would cause a misinvocation.

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 schema already defines each of the 15 parameters, and the baseline would be 3. The description earns more by mapping parameters to actions — `resize` takes x/y/width/height, `focus`/`maximize`/`minimize`/`restore`/`close` take a processName, processId or title substring target, `switch_tab` takes index 1–9 or a direction — which the flat schema cannot express.

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 domain ("Windows, apps and displays at the OS level") and then enumerates every sub-action with a verb and its object (`list`, `focus`, `open_file`, `navigate`). It also explicitly carves out sibling territory: `accessibility` for window contents and `browser` for a page's DOM, so an agent can separate this tool from the three adjacent ones without opening a schema.

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?

Routes the agent away from this tool when the target is inside a window or a DOM, and organizes actions into Read / Arrange / Open so the right sub-action is easy to pick. It also gives a conditional prerequisite for `close` ("ask the user first unless they asked for it") and explains that no target argument means the foreground window.

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