window
Control desktop apps and displays at OS level: list apps, focus, monitor bounds, and screen size. Open apps/files/URLs and focus, arrange, resize, minimize, maximize, restore, or close GUI items.
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).
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
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | New X (top-left origin, logical px) | |
| y | No | New Y (top-left origin, logical px) | |
| url | No | https:// or http:// URL | |
| name | No | Application name (e.g. "notepad", "calc", "mspaint", "Outlook", "Chrome") | |
| path | No | Absolute filesystem path | |
| index | No | Jump to tab N (1-based, 1-9). If omitted, direction must be provided. | |
| space | No | ||
| title | No | Window title substring to match | |
| width | No | New width in logical px | |
| action | Yes | 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. | |
| expect | No | 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. | |
| height | No | New height in logical px | |
| direction | No | Cycle "next" or "previous". Ignored when `index` is given. | |
| processId | No | Process ID to focus | |
| processName | No | Process name to focus (e.g. "notepad", "msedge") |