Skip to main content
Glama

parse_screen

Read-only

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

NameRequiredDescriptionDefault
sourceNoauto
instanceNo
granularityNoline
box_thresholdNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "auto",
      +  "title": "Source",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / granularity
      Added value: +{
      +  "default": "line",
      +  "title": "Granularity",
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Far exceeds the annotations (readOnlyHint/openWorldHint): it documents the full return envelope, latency and GPU-queue behavior, the shared service process, per-source element fields, the 300-element cap with 'truncated', and exactly which failure conditions raise isError with the fix named. The id-lifetime constraint ('only valid until the screen changes') is critical behavior no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly with purpose, return shape, then per-source detail, but it is a dense multi-hundred-word wall with deep reference material (detector class enumerations, GLOVEBOX_OCR_SCALE rationale, 2× OCR justification) that an agent rarely needs to pick and call the tool. Much of it would serve better as reference docs; the core invocation guidance is buried mid-paragraph.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists, the description still adds what the schema cannot: fallback semantics, per-source element fields, error conditions, the element cap, and id invalidation. For a tool with zero schema coverage on four params and three distinct backends, nothing essential for a correct call appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% with four undocumented params, so the description must carry the load — and it does for `source` (auto/a11y/vision semantics and failure modes), `granularity` ('line' merges words, split at wide gaps; 'word' for single words) and `box_threshold` (raises the detector's confidence floor). The `instance` parameter (which display to target) is never explained, leaving one real gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List the on-screen elements with ids + pixel-centers') and immediately names the downstream tools that consume the ids (click_element, act, fill), so an agent can distinguish it from siblings like find_elements or screenshot without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing: default source='auto' tries the app's accessibility tree and falls back to vision, source='a11y' fails rather than falling back, source='vision' skips the app, and when results are truncated it says to use find_elements rather than paging. It also warns to re-parse after navigation because ids expire. It stops short of a crisp 'prefer X over this tool when…' rule against screenshot/find_elements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.