desktop_read_region
Run a real vision-language OCR model on a region of the VM's display and return all its text.
Returns TEXT ONLY — there is no image in this response. Call
desktop_screenshot when you need to see the pixels.
UNLIKE desktop_screenshot (which returns OmniParser's filtered UI-element list — only button and icon labels), this runs a transformer-based OCR model on the raw pixels and returns ALL the text. Use this when you need to: • Read terminal output • Read browser page body content (articles, docs, error messages) • Read dialog body text • Verify exact text that OmniParser's UI filter drops
TWO MODES: • Default (include_coordinates=False): Nanonets OCR 2 returns structured markdown with preserved tables, code blocks, headings, and lists. Optimized for READING. • Opt-in (include_coordinates=True): EasyOCR returns per-line text + pixel centers. Optimized for CLICKING on something you read.
Region defaults to the full screen. Pass x/y/width/height to OCR a sub-region.
Coordinates in lines[] responses are always in full-screen pixel space, so the
center values can be fed directly to a desktop_interact click action.
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": {
"vm_name": "<vm_name>"
},
"name": "desktop_read_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Top-left X of region in pixels (default: 0) | |
| y | No | Top-left Y of region in pixels (default: 0) | |
| width | No | Region width in pixels. -1 (default) means 'to the right edge'. | |
| height | No | Region height in pixels. -1 (default) means 'to the bottom edge'. | |
| api_key | No | MCP API key | |
| vm_name | Yes | VM to drive. For a graph launch use its returned of-deploy-* vm_name. For image verification use the of-test-* vm_name returned by resume_test_environment or vms[].vm_name / environment.snapshot.vm_name from get_test_results. For app testing use your own of-desktop-* or of-tester-* VM. | |
| include_perf | No | Include per-stage timing metrics in the response. | |
| session_token | No | Session token | |
| include_coordinates | No | If False (default): use Nanonets OCR 2 and return STRUCTURED MARKDOWN of everything on screen — best for reading terminal output, articles, logs, dialog body text. Markdown preserves tables, code blocks, headings. If True: use EasyOCR and return per-line {text, center, confidence} with screen-space pixel coordinates. Use this mode when you need to CLICK on something you just read. |