Apps, windows and screen
Apps and windows, window state and screenshots, the screen, and lifecycle sessions.
| Tool | Description | Platforms |
|---|---|---|
list_apps | List macOS apps, both currently running and installed-but-not-running, with per-app state flags: - running: is a process for this app live? | macOS, Linux, Windows |
list_windows | List top-level windows known to WindowServer, including off-screen ones (minimized, other Space, hidden): layer-0 only without pid, every layer with pid. | macOS, Linux, Windows |
launch_app | Launch a macOS app in the background: the target does NOT come to the foreground. | macOS, Linux, Windows |
kill_app | Force-terminate a process by pid (kill -9 equivalent on macOS / Linux; taskkill /F equivalent on Windows). | macOS, Linux, Windows |
bring_to_front | Persistently activate an app and leave it in the foreground. | macOS, Linux, Windows |
set_window_frame | Set one exact top-level window's frame in the desktop-coordinate space reported by list_windows and verify the resulting geometry through an independent readback. | macOS, Linux, Windows |
invoke_menu | Resolve an exact application-menu path one live native level at a time and invoke its final item through accessibility APIs. | macOS, Linux, Windows |
debug_window_info | Diagnostic: dump everything cua-driver sees about a pid's top-level windows from the daemon's session perspective. | Windows |
get_window_state | Snapshot a window: the accessibility tree plus a screenshot. | macOS, Linux, Windows |
get_accessibility_tree | Return a lightweight snapshot of the desktop: running regular apps and on-screen visible windows with their bounds, z-order, and owner pid. | macOS, Linux, Windows |
verify_state | Deterministically verify bounded predicates against one exact window. | macOS, Linux, Windows |
parse_visual_regions | Parse one immutable registered capture into model-neutral text and icon regions. | macOS, Linux, Windows |
get_desktop_state | Capture the full display. | macOS, Linux, Windows |
get_screen_size | Return the logical size of the main display in points plus its backing scale factor. | macOS, Linux, Windows |
get_cursor_position | Return the current mouse cursor position in screen points (origin top-left). | macOS, Linux, Windows |
zoom | Capture a cropped JPEG of a window region (x1,y1)–(x2,y2) in screenshot pixel coordinates, with 20% padding added on each side. | macOS, Linux, Windows |
start_session | Optionally create or return a lifecycle session before acting. | macOS, Linux, Windows |
escalate_session | Deprecated compatibility tool for legacy capture-scope sessions. | macOS, Linux, Windows |
get_session | Read content-free lifecycle, cursor, recording, and idle status for one session visible to this authenticated transport. | macOS, Linux, Windows |
list_sessions | List content-free lifecycle summaries attached to this authenticated transport lease. | macOS, Linux, Windows |
get_session_state | Deprecated compatibility alias that reads a live legacy session's capture policy. | macOS, Linux, Windows |
end_session | End one visible lifecycle session and run its cursor, recording, configuration, and other cleanup hooks exactly once. | macOS, Linux, Windows |
Served by cua-driver mcp; see MCP tools for every tool.
App and window tools#
List, launch, quit, front and arrange apps and windows.
list_apps#
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
List macOS apps, both currently running and installed-but-not-running, with per-app state flags:
- running: is a process for this app live? (pid is 0 when false)
- active: is it the system-frontmost app? (implies running)
- launch_path: filesystem path to the
.appbundle, when known. Pass this tolaunch_appto start the app cold. - kind:
"desktop"for.appbundles on macOS. - last_used: RFC3339 timestamp from the bundle's filesystem mtime, when readable.
Optional fields (bundle_id, launch_path, kind, last_used) are omitted when unknown, never null.
Standalone running entries include only apps with NSApplicationActivationPolicyRegular: background helpers and system UI agents are filtered out. Installed apps resolve their running/pid state against all live processes by bundle identifier, so an installed app whose process runs as an accessory (LSUIElement / menu-bar apps, e.g. Cua Driver itself) still reports its live pid. Installed apps come from scanning /Applications, /Applications/Utilities, ~/Applications, /System/Applications, and /System/Applications/Utilities.
Use this for "is X installed?" as well as "is X running?"; the list includes every installed app. To get an open app's pid and window_id, call list_windows({app: "Name"}) instead, which also gives per-window state (on-screen, on-current-Space, minimized, window titles). For just opening an app, running or not, call launch_app({bundle_id: ...}) directly; list_apps is not a prerequisite.
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
list_windows#
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
List top-level windows known to WindowServer, including off-screen ones (minimized, other Space, hidden): layer-0 only without pid, every layer with pid. Use it to find a pid and window_id for get_window_state; filter with app or pid, because an unfiltered call lists every window on the host. AppKit-internal helper windows and the driver's own overlay are omitted.
Per record: window_id, pid, app_name, title, bounds, layer, z_index, is_on_screen, space_ids, current_space_id, on_current_space. For the frontmost window take the maximum integer z_index; null means stacking is unavailable, so do not infer it from array order.
macOS parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
on_screen_only | boolean | Drop windows not on the current Space. | |
pid | integer | Only this pid's windows, on every layer. |
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
app | string | Only windows of apps whose name contains this text (case-insensitive), or whose bundle id equals it. Prefer this or pid over an unfiltered call, which returns every window on the host. | |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
launch_app#
Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
Launch a macOS app in the background: the target does NOT come to the foreground.
Provide either bundle_id (preferred: unambiguous, e.g. com.apple.calculator) or name (e.g. "Calculator"). If both are given, bundle_id wins.
Optional urls are handed to the app as open targets: for Finder, pass a folder path to open a backgrounded Finder window there.
Browser DevTools setup belongs to browser_prepare, which can prove that a separate isolated profile is driver-owned before enabling CDP.
Optional webkit_inspector_port: opens a WebKit inspector server on the specified port (sets WEBKIT_INSPECTOR_SERVER=127.0.0.1:N + TAURI_WEBVIEW_AUTOMATION=1). Use this for Tauri/WebKit-based apps.
Optional creates_new_application_instance: when true, forces a new app instance even if one is already running (passes -n to open). Reach for this when another agent or session may drive the SAME app concurrently: it returns a fresh pid + window so each session acts on its own isolated window instead of clobbering one shared instance. Without it, single-instance apps (Calculator, many utilities) hand every caller the same window, so two sessions fight over it.
Optional additional_arguments: extra argv strings appended after --args.
Returns the launched app's pid, bundle_id, name, and a windows array (same shape as list_windows) so callers can skip an extra round-trip before get_window_state(pid, window_id). launch_state distinguishes whether the request was sent, the process is running, and a window is ready. When the focus-steal belt-and-braces demotion check ran (target pid ≠ prior frontmost), the response also includes self_activation_suppressed: bool; true if focus stayed with the prior frontmost, false if the launched app held focus despite the re-demote attempt.
macOS parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
additional_arguments | string[] | Extra arguments appended after --args when launching. | |
bundle_id | string | App bundle identifier, e.g. com.apple.calculator. Preferred over name. | |
creates_new_application_instance | boolean | When true, force a new app instance even if already running (open -n). Use for concurrent multi-agent/multi-session work so each session gets an isolated instance + window instead of sharing one: on single-instance apps (e.g. Calculator) every caller otherwise gets the same window and the sessions clobber each other. | |
name | string | App display name. Used only when bundle_id is absent. | |
urls | string[] | Optional file paths or URLs to open with the app (e.g. a folder path for Finder). | |
webkit_inspector_port | integer | Open a WebKit inspector server on this port (sets WEBKIT_INSPECTOR_SERVER env var). |
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
kill_app#
Effect: destructive, idempotent. Platforms: macOS, Linux, Windows.
Force-terminate a process by pid (kill -9 equivalent on macOS / Linux; taskkill /F equivalent on Windows). Use as escalation when the cooperative close path (hotkey cmd+q on macOS, click-the-X on Windows) failed to make the process exit. Unsaved state is lost: prefer the cooperative path first.
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
pid | integer | required | PID of the process to terminate. |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
Example arguments
{"pid":1}bring_to_front#
Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
Persistently activate an app and leave it in the foreground. Most input does not need this; use it only for a focus-proxy surface that must remain foreground across interactions. With window_id, success means the exact ordinary macOS window was independently verified as the frontmost process's focused window and the front window of that process on the display it sits on. exact_window_effect.frontmost_ordinary additionally reports whether it is first in the global WindowServer layer-0 order; another application (an always-raised utility window, another display's front window) can hold that spot without the requested window losing keyboard focus, so it is reported and not required. Request acceptance alone is reported as a partial result, never as activation. This DOES steal foreground and does NOT restore the previously frontmost application.
macOS parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
pid | integer | required | Process ID of the app to activate. |
window_id | integer | CGWindowID to verify as the focused, frontmost window. Omit to activate the app only. |
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
Example arguments
{"pid":1}set_window_frame#
Set one exact top-level window's frame in the desktop-coordinate space reported by list_windows and verify the resulting geometry through an independent readback.
Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
height | number | required | New height, in the same units as list_windows bounds. Minimum: 1. |
pid | integer | required | Process ID that owns the window. Minimum: 1. |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. | |
width | number | required | New width, in the same units as list_windows bounds. Minimum: 1. |
window_id | integer | required | Window ID from list_windows. Minimum: 1. |
x | number | required | New left edge in the desktop coordinate space reported by list_windows. |
y | number | required | New top edge in the desktop coordinate space reported by list_windows. |
Example arguments
{"pid":1,"window_id":1,"x":100,"y":200,"width":1,"height":1}invoke_menu#
Resolve an exact application-menu path one live native level at a time and invoke its final item through accessibility APIs. Missing, ambiguous, disabled, or structurally mismatched segments fail closed; this tool never falls back to pixels. Menu paths and refusals: get_guide({topic:"menus"}).
Effect: destructive. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | string[] | required | Menu labels from the top-level menu to the item, e.g. ["File", "Save As..."] (1 to 16 labels). Items: 1 to 16. |
pid | integer | required | Process ID of the application that owns the menu. Minimum: 1. |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. | |
window_id | integer | required | Window ID from list_windows whose menu is invoked. Minimum: 1. |
Example arguments
{"pid":1,"window_id":1,"path":["<path>"]}debug_window_info#
Diagnostic: dump everything cua-driver sees about a pid's top-level windows from the daemon's session perspective. Returns window class names, owning .exe basename + path, and, when CUIAutomation succeeds, the focused UIA element with the list of patterns it supports (ValuePattern, InvokePattern, TextPattern, TogglePattern, etc.). Used to design / debug input routing for XAML / UWP / WinUI3 targets; see CUA-543.
Effect: read-only, idempotent. Platforms: Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
pid | integer | required | PID of the process to inspect. |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
Example arguments
{"pid":1}Window state tools#
Screenshots, accessibility trees, verification and visual regions of a window.
get_window_state#
Effect: read-only. Platforms: macOS, Linux, Windows.
Snapshot a window: the accessibility tree plus a screenshot. By default the tree is ONE compact Markdown rendering (tree_format:"markdown"): a row [N] is addressed with element_token <snapshot_id>:N, where snapshot_id is in the response header and in structuredContent. tree_format:"elements" returns the structured elements array instead (element_index, element_token, role, label, value, actions, frame, parent_index, depth); "both" returns both (about twice the size). Pass the token to click, type_text, press_key, etc.
START NARROW: a read walks at most 250 nodes by default and says Tree truncated at max_elements=… (truncated:true) when it stops; raise max_elements, or use query (case-insensitive substring; matching rows plus ancestors) and max_depth. Indices and tokens stay valid for the whole snapshot. verbose:true adds _note and the full background_input report; full_output:true restores the previous full response (both representations, all metadata, ≤2 000 nodes).
DIFF READS (use them for every re-read after acting): since:"latest", or since:<snapshot_id> from an earlier read of the same window, returns only what changed: + added, ~ changed, - removed rows (removed ids are the old snapshot's), a reindexed: line if indices shifted, or no change since …; focused element is …. The response carries a NEW snapshot_id: use it in tokens. An unknown, expired, other-window or differently-scoped (query/max_elements/max_depth) since falls back to a full read; since_status says why.
A new snapshot of the same (pid, window_id) replaces the previous one and stales its tokens (invalidated_snapshot_ids). include_screenshot:false returns the tree only and keeps the last screenshot's pixel frame while the window keeps its size; include_accessibility_tree:false returns only the screenshot and keeps the current snapshot's rows and tokens valid (use it, not max_elements:1, when you just need to look); adding display_only:true (live previews) also leaves the pixel frame alone. The tree can lie on some surfaces (Electron, Catalyst, virtualized rows with h:1 frames): cross-check the screenshot, and use pixel x,y at action time only for elements missing from the tree.
Refusals: window_id_not_found; window_owner_pid_mismatch names the real owner_pid (sandboxed Open/Save panels belong to a panel service). degraded_reason ax_window_unresolved or ax_app_launching (the latter with truncation_reason: app_lookup_timeout) means an empty tree: re-snapshot, or act with delivery_mode:"foreground". degraded_reason screen_locked means the screen saver, display sleep or a lock hid every window from accessibility: wake and unlock the Mac, then re-snapshot; foreground input would reach the lock screen. px_frame_mismatch / px_capture_unavailable omit the unprovable screenshot; the AX payload stays valid.
macOS parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
include_accessibility_tree | boolean | Default true. False skips the AX walk and returns the screenshot plus window metadata. Both this and include_screenshot false is an error. | |
include_screenshot | boolean | Default true. False returns the tree only (saves image tokens and latency); screenshot_out_file still forces a capture. | |
max_depth | integer | Cap on walk depth. Default 25. Minimum: 1. | |
max_dimension | integer | Optional cap on the returned screenshot's long edge, in pixels (aspect ratio preserved): the cheap path for a small preview / thumbnail. Applied on top of the session/global max_image_dimension ceiling; the tighter of the two wins. Omit for the configured default. Minimum: 1. | |
max_elements | integer | Cap on AX nodes walked (depth-first; markdown and elements truncate together). Default 250 (2 000 with full_output:true); the response states when the tree was cut. Minimum: 1. | |
max_image_dimension | integer | Per-call override for the returned screenshot's long edge in pixels. An explicit value wins over the session/global setting; 0 returns native resolution. Omit to preserve configured behavior. Minimum: 0. | |
pid | integer | required | Target process ID. |
query | string | Case-insensitive substring filter: returns matching rows plus ancestors; element_index values are not renumbered. Try this before a full read. | |
screenshot_out_file | string | When set, write the PNG to this file path (~ expanded) instead of embedding base64 in the response. The structured output will contain screenshot_file_path instead. | |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. | |
window_id | integer | required | Target window ID from list_windows. |
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
capture_mode | "ax" | "vision" | DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot: ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_token) or an element px action (x,y). Any value (including the old "som"/"screenshot" aliases) is accepted but has no effect. | |
display_only | boolean | Default false. With include_accessibility_tree:false, returns pixels for display without registering an action capture or replacing the agent snapshot. The image cannot ground input actions. | |
full_output | boolean | Default false. Set true to restore the previous full response: both elements and tree_markdown, all metadata, and the platform's own walk limits unless max_elements / max_depth are passed. Does not combine with since. | |
since | string | A snapshot_id from an earlier get_window_state of the same window, or "latest" for this window's most recent read with the same query/max_elements/max_depth. Use it on every re-read after acting. Returns only what changed against that snapshot: + added rows, ~ changed rows, - removed rows (removed ids are the old snapshot's), or no change. Falls back to a full read when the snapshot is unknown, expired, belongs to another window, or was read with a different query/max_elements/max_depth; since_status says which. The response still carries a NEW snapshot_id and its element_tokens; rows not listed keep their previous [N] unless a reindexed: line says otherwise. | |
timeout_ms | integer | 1000 | Wall-clock budget in milliseconds for the accessibility-tree walk (default 1000, min 100, max 120000). Bounds the WHOLE walk. When the budget runs out the tool returns the PARTIAL tree it has, flagged with truncated: true, truncation_reason, nodes_visited, nodes_pending and elements_complete: false; retry with a larger value (e.g. 5000) or narrow with query / max_depth. Range: 100 to 120000. |
tree_format | "markdown" | "elements" | "both" | Which tree representation to return. Default "markdown": the compact tree_markdown only, where a row [N] is addressed with element_token <snapshot_id>:N. "elements": the structured elements array only (per-element element_token, frame, parent_index, value). "both": the two together, as before; roughly doubles the size. | |
verbose | boolean | Default false. Set true to include the _note string and the full background_input capability report (macOS), which are omitted by default to save context. |
Example arguments
{"pid":1,"window_id":1}get_accessibility_tree#
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
Return a lightweight snapshot of the desktop: running regular apps and on-screen visible windows with their bounds, z-order, and owner pid.
For the full AX subtree of a single window (with interactive element indices you can click by), use get_window_state instead: that's the heavy per-window tool. This one is a fast discovery read that needs no TCC grants.
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
verify_state#
Deterministically verify bounded predicates against one exact window. The driver evaluates structured window/accessibility state and may return the final screenshot as uninterpreted visual evidence for a multimodal caller. Predicate results are satisfied, unsatisfied, or unknown; unknown never implies success. Accessibility projections are conservative: absence remains unknown unless the observed search domain is proven exhaustive.
Effect: read-only. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
expect | object[] | required | One to eight predicates, combined with logical AND. Items: 1 to 8. |
include_screenshot | boolean | Return the final window screenshot as image content for a multimodal caller. The driver does not interpret that image. | |
pid | integer | required | Exact process whose window may be observed. Minimum: 1. |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. This field never selects capture modality or authorization. | |
stable_samples | integer | 2 | Consecutive satisfied samples required before returning success. Range: 1 to 5. |
timeout_ms | integer | 5000 | Bounded wait. Zero performs one sample. Range: 0 to 10000. |
window_id | integer | required | Exact native window identifier. |
Example arguments
{"pid":1,"window_id":1,"expect":[{}]}parse_visual_regions#
Parse one immutable registered capture into model-neutral text and icon regions.
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
capture_id | string | required | capture_id of a screenshot returned by get_window_state or get_desktop_state. |
options | object | {} | Optional, model-neutral controls for one bounded parse. |
options.kinds | "text" | "icon"[] | Region kinds to return (text, icon). Omit for all kinds. Items: 1 to 2. | |
options.max_regions | integer | Return at most this many regions. Minimum: 1. | |
options.min_confidence | number | Drop regions below this confidence (0 to 1). Range: 0 to 1. | |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
Example arguments
{"capture_id":"<capture_id>"}Screen tools#
The desktop, screen size, cursor position and zoomed crops.
get_desktop_state#
Effect: read-only. Platforms: macOS, Linux, Windows.
Capture the full display. The long edge is capped at max_image_dimension (the configured default unless given); pixels of the returned image map back to the screen through its capture. Use its PNG as the coordinate source for actions whose target is {kind:"desktop",display_id:"primary"}. Returns the true screen size and backing scale factor. Vision-only: no AX tree walk.
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
max_image_dimension | integer | Optional long-edge cap for the returned PNG, in pixels (aspect ratio preserved). Omitted or 0 returns the full-size capture. When the cap downsizes the image, the response reports screenshot_original_width/height, and x/y read off it for this session's later scope:"desktop" actions (or passed with its capture_id) are mapped back to the full-size frame automatically. Minimum: 0. | |
screenshot_out_file | string | Write PNG here instead of base64. | |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
get_screen_size#
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
Return the logical size of the main display in points plus its backing scale factor. Agents click in points; Retina displays have scale_factor 2.0. Requires no TCC permissions.
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
get_cursor_position#
Return the current mouse cursor position in screen points (origin top-left).
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
zoom#
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
Capture a cropped JPEG of a window region (x1,y1)–(x2,y2) in screenshot pixel coordinates, with 20% padding added on each side. The output image is at most 500 px wide. Corners, not a size: x1,y1 is the top-left and x2,y2 the bottom-right (x,y,width,height is also accepted and converted).
After a zoom, pass from_zoom=true to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return screenshot_context_missing when no current snapshot contains a screenshot owned by this session. from_zoom actions return zoom_context_missing when the zoom was never created or was replaced; call get_window_state, then zoom, again on the same connection.
macOS parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
pid | integer | Optional target pid. When omitted, the driver resolves the unique current snapshot for this session and window. | |
window_id | integer | required | CGWindowID from list_windows. |
x1 | number | required | Left edge of region in screenshot pixels. |
x2 | number | required | Right edge of region in screenshot pixels. |
y1 | number | required | Top edge of region in screenshot pixels. |
y2 | number | required | Bottom edge of region in screenshot pixels. |
Parameters on every platform
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
Example arguments
{"window_id":1,"x1":100,"y1":200,"x2":100,"y2":200}Session tools#
Start, escalate, inspect and end lifecycle sessions.
start_session#
Optionally create or return a lifecycle session before acting. For multi-call work, prefer a short public session label and repeat it on every call that accepts it; an omitted value uses the authenticated transport lease's implicit session instead. This tool is optional because an ordinary action can create or reuse a named run directly. Use it to set the initial cursor theme before acting or to revive a public name after it has ended; ordinary actions never revive ended names. capture_scope is deprecated compatibility input; new callers select window or desktop modality per action. Idempotent.
Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
capture_scope | "auto" | "window" | "desktop" | Deprecated compatibility policy. New callers select window or desktop modality on each action instead of storing it on the session. | |
cursor_motion | object | Optional initial cursor motion (style, timing, effects and tuning). The host applies it before the cursor is first made visible. A later set_agent_cursor_motion call wins; this wins over the saved default (cursor.motion.* in the driver config) and the built-in signature_arc. Reduced motion always wins. | |
cursor_motion.arc_flow | number | Added to the arc asymmetry of signature_arc, spring_settle and comet_swoop: positive moves the apex toward the destination. Clamped to -1..1 (default 0). | |
cursor_motion.arc_size | number | Scales the arc of signature_arc, spring_settle and comet_swoop: 0.25 (default) keeps the style's arc, 0 is a straight line, 0.5 doubles it. Clamped to 0..1. | |
cursor_motion.dwell_after_click_ms | number | Pause after a click animation, in milliseconds. Clamped to 0..5000 (default 80). | |
cursor_motion.effects | object | Turn effects on or off. Omit a field to keep it; "default" restores the style default. | |
cursor_motion.end_handle | number | Arc control-point offset from the end, as a fraction of the distance, for signature_arc, spring_settle and comet_swoop. Clamped to 0..1 (default 0.3). | |
cursor_motion.glide_duration_ms | number | Move duration in milliseconds for fixed timing (1430 ms when 0, the default). A nonzero value with native or the default steady timing also fixes the duration. Clamped to 0..5000. | |
cursor_motion.idle_hide_ms | number | Hide the cursor after this many idle milliseconds; 0 never hides it. Clamped to 0..60000 (default 15000). | |
cursor_motion.spring | number | Arrival spring damping for classic: 1 is critically damped, 0.3 is bouncy. Clamped to 0.3..1 (default 0.72). | |
cursor_motion.start_handle | number | Arc control-point offset from the start, as a fraction of the distance, for signature_arc, spring_settle and comet_swoop. Clamped to 0..1 (default 0.3). | |
cursor_motion.style | "signature_arc" | "spring_settle" | "magnetic" | "comet_swoop" | "adaptive" | "classic" | Trajectory style. signature_arc (default) is one arc with a small follow-through; spring_settle lands with one soft bounce; magnetic is pulled into the target; comet_swoop is a wide arc with a short trail; adaptive picks a careful approach for small targets and a swoop for long moves; classic is the previous Dubins glide. When the theme's reduced motion is on, every move is a short straight glide with no effects. | |
cursor_motion.timing | "native" | "fitts" | "fixed" | "relaxed" | "steady" | "calm" | "deliberate" | steady (default) keeps the style's timing but makes every move take at least 600 ms, with a gentler ease; relaxed and calm do the same with a 450 or 750 ms floor. native uses the style's own timing; fitts scales the move time with distance and target size; deliberate is a slower Fitts curve (450..1300 ms); fixed uses glide_duration_ms (1430 ms when 0). | |
cursor_motion.turn_radius | number | Minimum turning radius of the classic glide path, in points; smaller turns tighter. Clamped to 1..1000 (default 80). | |
cursor_theme | object | Optional initial cursor theme. The host applies it before the cursor is first made visible, avoiding a flash of the default theme. | |
cursor_theme.reduced_motion | "auto" | "on" | "off" | "auto" | |
cursor_theme.theme_id | string | ||
session | string | Optional stable public label for this run (e.g. "research-run-1"). When omitted, the authenticated transport lease's implicit session is created or returned. |
escalate_session#
Deprecated compatibility tool for legacy capture-scope sessions. New callers select window or desktop modality on each action. No deescalate_session tool exists.
Effect: mutating. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
detail | string | Optional bounded diagnostic detail. Never use secrets or page content. | |
reason | "ax_tree_pixel_mismatch" | "background_delivery_failed" | "foreground_ineffective" | "no_window_target" | "other" | required | Why the window-scoped attempt failed and desktop capture is needed. |
session | string | required | Public label of the legacy capture-scope session to escalate. |
Example arguments
{"session":"<session>","reason":"ax_tree_pixel_mismatch"}get_session#
Read content-free lifecycle, cursor, recording, and idle status for one session visible to this authenticated transport. Omit session to inspect its implicit session.
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | Optional public label. When omitted, inspect the caller's attached implicit session. |
list_sessions#
List content-free lifecycle summaries attached to this authenticated transport lease. It does not enumerate other callers' sessions.
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
cursor | string | Opaque continuation cursor returned by a previous call. | |
limit | integer | Maximum number of content-free summaries to return (default 50, max 100). Ordinary agent transports are scoped to their own lease. Minimum: 0. |
get_session_state#
Deprecated compatibility alias that reads a live legacy session's capture policy. Use get_session for lifecycle state.
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | Optional public label. When omitted, inspect the caller's attached implicit session. |
end_session#
End one visible lifecycle session and run its cursor, recording, configuration, and other cleanup hooks exactly once. Omit session to end the authenticated transport's implicit session. Idempotent.
Effect: destructive, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
session | string | Optional public label to end. When omitted, end the caller's attached implicit session. |