ocr_screenshot
Run OCR on the current page to extract text and obtain click-ready coordinates for locating or clicking text elements. Returns plain text or structured JSON with spatial grouping and button detection.
Instructions
PREFERRED over take_screenshot when you only need text or want to locate/click a text element (cheaper, no vision model needed). Runs OCR on the current page. blocks=false (default) returns a plain string. blocks=true returns JSON: [{ text, center_x, center_y, is_likely_button? }] — spatially grouped phrases that isolate buttons, labels, links, etc. is_likely_button field is only present when true (text has a visible border/frame and looks clickable). center_x/center_y are ready to pass to click_at_coordinates. Use ocr_screenshot_search to find a specific word or phrase.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>"
},
"name": "ocr_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Tesseract language code(s), e.g. 'eng', 'deu', 'eng+deu' (default: 'eng'). | |
| blocks | No | false (default) = plain text string. true = JSON array of spatially grouped phrases: [{ text, center_x, center_y, width, height, confidence }]. Good for isolating buttons, labels, links. | |
| session_id | Yes | Session ID returned by start_browser. |