screen_elements
List the controls on a virtual machine's screen.
Lists the controls of a guest's windows, through UI Automation in Windows, AX in macOS and AT-SPI on a Linux desktop, one line per element indented by depth: its role, name, value, ref, box [x0, y0, x1, y1] in coordinate_space, states and actions. Each read gives new refs, which act with element_action until their element changes or goes or they expire; boxes go to input_actions as they are. A User Account Control prompt or a locked screen fails the call. macOS asks a person once to allow OSMates Agent, and clones of the machine keep it; until then the call fails saying so while macOS shows its request on the machine's screen, which you leave to the person: do not click or type into it. A Linux Wayland desktop gives no boxes.
- Profiles
- read-only, operator, full
- Read-only
- Yes
- Destructive
- No
- Idempotent
- Yes
- Open world
- No
- Runs as a task
- No
Parameters
coordinate_spacestringdisplay: pixels of what the display shows now (default). screenshot: pixels of a scaled screenshot screenshot_width wide. normalized_1000: 0 to 999 across each side.
One of
display,screenshot,normalized_1000.include_offscreenbooleanList elements scrolled or collapsed out of view; default false.
max_depthintegerDefault 30. With mode skeleton default 3, at most 99.
From 1 to 100.
max_elementsintegerEvery element read counts, also unlisted ones; default 500.
From 1 to 2000.
modestringfull (default): every element listed. interactive: windows, the focused element and the elements that take an action other than focus and scroll_into_view, nested as they sit. skeleton: max_depth levels, 3 by default, each element with its count of children; read further with scope element and its ref.
One of
full,interactive,skeleton.refstringWith scope element: the ref whose subtree to read.
scopestringfocused (default): the window with the focus and its menus and popups. screen: every window front to back. element: the subtree of ref.
One of
focused,screen,element.screenshot_widthintegerThe width of the screenshot the coordinates are in.
From 1 to 8192.
sincestringA readId this session got: list only the elements added, removed or changed since then, read again with that read's scope, mode and limits, so leave those out. Unchanged elements keep their earlier refs. A machine keeps its last 8 reads, until 10 minutes pass without an element request.
timeout_secondsintegerSeconds the guest may take; default 5.
From 1 to 20.
vmstringRequiredThe machine's name or identifier, as vm_list shows it.
Output
The result's structured content is an object with these fields.
JSON Schema: /schemas/0/mcp/tools/screen_elements/output.json
coordinateSpacestringRequiredOne of
display,screenshot,normalized_1000.elapsedintegerRequiredelementsobjectRequiredelements.guestDataarray of objectsRequiredframeIdstringRequiredlistedintegerRequiredAt least 0.
modestringRequiredOne of
full,interactive,skeleton.readIdstringremovedobjectremoved.guestDataarray of objectsRequiredscopestringRequiredOne of
focused,screen,element.sincestringsinceTruncatedstringOne of
depth,elements,time,size.truncatedstringOne of
budget,depth,elements,time,size.unchangedintegerAt least 0.
walkedintegerRequiredAt least 0.
Fields nested deeper are in the schema.