Request an invite
Docs menu

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_spacestring

display: 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_offscreenboolean

List elements scrolled or collapsed out of view; default false.

max_depthinteger

Default 30. With mode skeleton default 3, at most 99.

From 1 to 100.

max_elementsinteger

Every element read counts, also unlisted ones; default 500.

From 1 to 2000.

modestring

full (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.

refstring

With scope element: the ref whose subtree to read.

scopestring

focused (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_widthinteger

The width of the screenshot the coordinates are in.

From 1 to 8192.

sincestring

A 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_secondsinteger

Seconds the guest may take; default 5.

From 1 to 20.

vmstringRequired

The 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

coordinateSpacestringRequired

One of display, screenshot, normalized_1000.

elapsedintegerRequired
elementsobjectRequired
elements.guestDataarray of objectsRequired
frameIdstringRequired
listedintegerRequired

At least 0.

modestringRequired

One of full, interactive, skeleton.

readIdstring
removedobject
removed.guestDataarray of objectsRequired
scopestringRequired

One of focused, screen, element.

sincestring
sinceTruncatedstring

One of depth, elements, time, size.

truncatedstring

One of budget, depth, elements, time, size.

unchangedinteger

At least 0.

walkedintegerRequired

At least 0.

Fields nested deeper are in the schema.

Report a problem with this page