locate
Find visible text in an image via OCR and return its [x1,y1,x2,y2] rectangle for screenshots or desktop captures without DOM or accessibility data.
Instructions
Find visible text on an image by OCR and return its rect, for images where you have no DOM or accessibility data (desktop captures, the user's screenshots). Rects are [x1,y1,x2,y2] in image px (spec scale 1), best match first; several equally good matches = ambiguous: ask the user, or pass nth (0-based, reading order) or within [x1,y1,x2,y2]. all=true also lists weaker matches. Runs on this machine (macOS Vision, Windows OCR or Tesseract); reads the image, writes nothing. If the text is not found, use grid + zoom. Returns matches with score and a preview outlining them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Also list weaker matches, not only the best ones. | |
| nth | No | Pick one of several equal matches, 0-based in reading order. | |
| lang | No | OCR language code, e.g. "en", "ro", "de". Omit for the default. | |
| text | Yes | Visible text to find: a word or short phrase as it appears on the image. | |
| exact | No | Require the exact text (case and spacing), not a close match. | |
| within | No | Search only inside [x1, y1, x2, y2], image px. | |
| backend | No | OCR engine: "vision" (macOS), "winrt" (Windows), "tesseract", or omit for auto. | |
| image_path | Yes | Path of a PNG, JPEG or WebP image on this machine (~ allowed). |