get_window_state
Capture an indexed Accessibility UI tree from any macOS window or app in the background, including window-relative coordinates, state diffs, and optional isolated screenshots for UI automation.
Instructions
Capture the indexed Accessibility (AX) UI tree ([1], [2], ...) of any macOS window or application in the background with 1:1 window-relative @(x,y WxH) coordinates, smart diffing, and optional isolated window screenshot.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_window_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Application name or bundle ID (auto-launches in background if auto_launch=true). | |
| window_id | No | Target window ID from list_windows / get_state. | |
| auto_launch | No | Auto-launch app in background if not running (default true). | |
| disable_diff | No | Force returning the full AX tree instead of a diff against previous state. | |
| window_title | No | Optional substring match on window title. | |
| include_cursor | No | When capturing a screenshot, composite the live virtual cursor and highlight overlay into the image (default false so screenshots stay clean). | |
| screenshot_only | No | Return only the screenshot (resets AX diff baseline for next state call). | |
| include_screenshot | No | Include isolated 1:1 point JPEG screenshot of the window (default false). |