capture_window
Screenshot a single desktop app window by its list_windows ID without moving, resizing, or focusing it, and save the PNG for annotation.
Instructions
Screenshot one window by id (from list_windows); never moves, resizes or focuses it. On macOS other windows covering it do not show; on Windows and Linux they may, since the fallback grabs the window's screen area. Use it for desktop apps; capture_screen for several windows, capture_web for web pages. macOS only: targets {name: {"element": label, "role"?, "nth"?, "exact"?}} measures buttons and fields through Accessibility (needs that permission) and returns their rects plus the scale for the annotate spec. Needs Screen Recording on macOS. Writes a PNG to the temp folder. Returns its path, size, window_id, rects and scale when targets were given, and a preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Window id from list_windows. | |
| targets | No | macOS only. Named controls to measure: {"name": {"element": "label", "role"?: "button", "nth"?: 0, "exact"?: true}}. |