screen_to_text
Convert screenshots to compact structured text with bounding boxes, reducing vision model token usage. Ideal for native desktop apps, remote desktops, and surfaces without an accessibility tree.
Instructions
Read a screenshot as compact structured text instead of sending an image.
A screenshot costs a vision model roughly 1,600 to 4,800 image tokens. This returns the same screen as a few hundred tokens of text in reading order, with a bounding box per line, so you can see what is on screen and where to click without spending them. Omit image_path to capture the current monitor.
detail is "lines" (default: text plus one box per line), "text" (cheapest, reading order only), or "words" (a box per word — on a dense screen this can cost MORE tokens than the screenshot did, and the reply says so when it has).
Read these limits before relying on it. The text comes from Tesseract OCR, so it is a best-effort transcription and not a user-interface tree: it cannot report widget types, enabled or checked state, focus, scroll position, or anything off-screen, and it misreads small or low-contrast text. If the target is a web page, use Playwright's accessibility tree instead — that is already structured text, it is exact, it includes content scrolled out of view, and it costs no model tokens to produce. This tool is for surfaces with no such tree: native desktop applications, remote desktops, canvas and WebGL, video frames, and scanned documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | lines | |
| image_path | No | ||
| min_confidence | No |