focus_window
Focus any macOS window by app name, window ID, or window index, with automatic fallback to frontmost.
Instructions
Focus a macOS window by window id, app name, or frontmost fallback.
Args: app_name: Optional app name, bundle id, or process name window_id: Optional CoreGraphics window id window_index: Optional 1-based index among the app's windows
Returns: JSON string with focused window metadata, or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_name | No | ||
| window_id | No | ||
| window_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |