MCP tools

The MCP tool that returns the accessibility tree of what is on the Team's Simulator's screen: every element's role, text, position and nodeId.

simulator_describe_ui returns the accessibility tree of what the Team’s running Simulator shows: every element with its role, label, value, identifier, frame, whether it is enabled, and a nodeId to act on exactly that element. With x and y it returns only the element at that point. It is read-only.

Prefer it to screenshots for finding what to tap: pass an element’s nodeId (or its text or identifier) to simulator_tap and the other element tools, as described in simulator_find. Content drawn without accessibility (a game’s canvas, an unlabelled image) is not in the tree. When the app in front is busy and gives no accessibility data, the tool asks again for a few seconds before it gives up.

Read-only Destructive Idempotent
Yes No Yes

Inputs

Give both x and y, or neither.

Input Type Required Default What it does
teamId string (UUID) Yes — The Team, from list_teams
simulator string No The Team’s default device Which device, by id from list_simulators
x number, -100000 to 100000 No — With y: only the element at this point, in screen coordinates
y number, -100000 to 100000 No — With x

Result

Field What
ok true
ui.format json
ui.tree The tree, starting at the app in front (AXApplication). Each element has the fields below and its children
ui.raw The same tree as one JSON string

Each element of ui.tree:

Field What
role The accessibility role, e.g. AXButton, AXStaticText, AXTextField, AXSlider
label Its visible text or accessibility label, or null
title A title, when it has one instead of a label
value Its value: a field’s text, a switch’s state, a slider’s position
identifier The app’s accessibilityIdentifier, when set
nodeId An opaque reference to exactly this element, to pass as nodeId. It stops working when the element goes away or the app restarts
frame x, y, width, height in screen coordinates
enabled Whether it is enabled, when iOS says
hidden Whether iOS reports it hidden
adjustable, adjustmentActions On a stepper, picker or wheel: the actions simulator_adjust can send (AXIncrement, AXDecrement)
activationPoint, sliderTrack On some controls: where a tap lands, and a slider’s track ends
children The elements inside it
{
  "ok": true,
  "ui": {
    "format": "json",
    "tree": {
      "role": "AXApplication", "label": "Notes", "enabled": true, "hidden": false,
      "frame": { "x": 0, "y": 0, "width": 402, "height": 874 },
      "children": [
        { "role": "AXButton", "label": "New note", "identifier": "new-note", "nodeId": "ax1:…",
          "enabled": true, "hidden": false,
          "frame": { "x": 16, "y": 120, "width": 370, "height": 52 }, "children": [] }
      ]
    },
    "raw": "{…}"
  }
}

Errors

Message When What to do
Give both x and y, or neither. Only one of them was given Send both, or neither
no accessibility data … The app in front is busy; try again in a few seconds. The app gave no tree even after the retries Wait a few seconds and call again

Plus the errors every Simulator tool can return: see start_simulator.

Example

{"name": "simulator_describe_ui", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000"}}