parse_screen
Lists on-screen UI elements with IDs and pixel centers so an agent can click, act on, or fill them, and saves a numbered annotation image for reference.
Instructions
List the on-screen elements with ids + pixel-centers — then click_element(id), act(id) or fill(element=id).
Returns {"ok", "source", "vision", "screen": [W,H], "annotated", "count", "truncated",
"elements": [{id, type, label, interactive, center: [x,y]}, …]}. Also saves a numbered
Set-of-Mark image (path in "annotated").
source picks who is asked. 'auto' (default) asks the APP first — accessibility: exact
labels and real element types, no GPU, tens of milliseconds — and falls back to vision when
the app exposes fewer than 3 elements (a canvas, a game, a Tk app;
"a11y_unavailable" says why). "source" in the reply names what answered:
'browser-dom' the active tab of a Chromium-family browser (roles, accessible names and
states from the DOM, open shadow roots and same-origin iframes included;
"frames_skipped": cross-origin iframes that could not be read — the
browser's own toolbar is never listed). Elements also carry "role",
"states" (disabled, checked, expanded, focused, required, readonly,
password, …), "value" (never a password's) and a select's "options";
"offscreen" counts the elements outside the viewport, which
find_elements can still find and click_element/act scroll into view.
'at-spi' a native toolkit app (GTK, Qt, LibreOffice) over the display's own
accessibility bus; elements carry "role", "states", "value", "actions".
'vision' pixels, as described below.
source='a11y' fails (isError) instead of falling back; source='vision' skips the app.
Vision backend = the effective GLOVEBOX_VISION: 'local' (OmniParser on the GPU, ~2 s after a ~10 s
first-call model load; served by ONE shared vision-service process per machine so parallel
agents don't each load the models — "via": "service"|"in-process", "queued_ms" says how long
the GPU queue was, "detector" which detector answered, "fallback_reason" why the service was
not used. "type" is "text"|"icon" with OmniParser's own detector; with the optional
ScreenParser detector (status().vision.omniparser.detector) it is one of text, button, link,
tab, input, checkbox, radio, switch, select, slider, stepper, rating, icon, image, item,
indicator and each element also carries "class", the detector's raw class name; buttons/tabs/
links carry their visible text as "label", icons/images a short caption. box_threshold
raises the detector's confidence floor to cut noise), 'basic' (tesseract, text only;
granularity='line' merges words on one line into one target like "Sign in" — default,
split at wide gaps so a menu bar is one target per item — or 'word' for single words; the
frame is OCR'd at 2× (GLOVEBOX_OCR_SCALE) because UI text is too small for tesseract at 1×;
each element also carries "confidence" 0–100), 'none' (returns a note telling you to
screenshot + reason about pixels yourself — this is normal, not an error; status() says why
if 'auto' fell back to it). Fails (isError) with the fix named when an explicitly requested
backend is not usable (OmniParser not installed, no/too-small GPU, GPU out of memory, the
vision service busy, tesseract missing its language data). Elements are capped at 300 per
call ("truncated": true when more were detected) — use find_elements to search instead of
paging. Ids are only valid until the screen changes — re-parse after navigation.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "parse_screen"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | auto | |
| instance | No | ||
| granularity | No | line | |
| box_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |