ocr
Read on-screen text via platform OCR, returning recognized lines with clickable coordinates. Use it on canvas, games, or custom-drawn views where accessibility trees are empty or partial.
Instructions
Read on-screen TEXT via the platform OCR engine (Apple Vision on macOS, Windows.Media.Ocr on Windows). Captures the display (or window="") and returns the recognized text lines, each with a clickable center in the same pixel space as a screenshot — so you can both READ the text and click a line with left_click(x, y). Returns text only (no image), so it is a cheap, fast way to pull text off the screen. Best when use it after ax_read reports absent/partial coverage and you need rendered TEXT from a surface where semantic nodes are empty or sparse — canvas, games, image-rendered or custom-drawn views — or to grab a lot of text at once without parsing a screenshot. For native/web UI with an Accessibility/UIA tree, ax_read + ax_activate is still more precise. mode=auto (default) tries fast recognition first and only falls back to accurate for empty/low-confidence output; mode=fast minimizes latency and mode=accurate forces maximum quality. roi={x,y,width,height} scopes OCR in the CURRENT image's pixels: the rectangle is strictly validated, mapped to the desktop, and re-captured through the native region path (never cropped from a downscaled JPEG). roi and window are mutually exclusive. Languages default to Simplified Chinese + English; pass languages=[...] (BCP-47) to override.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roi | No | Optional strict region of interest in the CURRENT image's pixel space. Nova maps it back to global logical coordinates and re-captures through the platform's native region path before JPEG encoding/OCR. It is never cropped from an already-downscaled JPEG. Every value must be finite, the size positive, and the entire rectangle in bounds. Mutually exclusive with `window`. | |
| mode | No | Recognition latency/quality policy. `auto` (default) starts with the fast Apple Vision recognizer and falls back to accurate only for empty or low-confidence output. On engines without a native mode knob the setting preserves that engine's normal behavior. | |
| window | No | Capture only a single on-screen window (case-insensitive substring of its title or app name) instead of the whole display. Smaller, sharper image → better recognition of small text. | |
| languages | No | BCP-47 language hints in priority order (e.g. ["zh-Hans", "en-US"]). Omitted, defaults to Simplified Chinese + English. |