MCP tools

The MCP tool that waits until an element appears or disappears on the Team's Simulator, or until the screen stops changing.

simulator_wait waits on the Team’s running Simulator until something happens on screen, then answers:

  • visible: until an element matching the selector is on screen (a disabled element counts as visible);
  • hidden: until no element matches it any more;
  • idle: until the screen’s accessibility tree has not changed for stableSeconds. Use it after an action that animates or loads. A spinner alone does not change the tree, so it counts as idle.

It touches nothing and is read-only. The selector is described in Selectors; idle takes none.

Read-only Destructive Idempotent
Yes No Yes

Inputs

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
state string: visible, hidden or idle Yes — What to wait for
text, id, value, role, nodeId, exact, strict see Selectors With visible and hidden — The element
timeoutSeconds number, 0 to 600 No 10 How long to wait
stableSeconds number, 0 to 10 No 0.5 With idle: how long the screen must stay unchanged

Result

Field What
ok true
state visible, hidden or idle
elapsedMs How long it waited, in milliseconds
element, point, exact, matchCount, excluded With visible: the element found, as in simulator_tap
{ "ok": true, "state": "hidden", "elapsedMs": 1250 }

Errors

Message When What to do
state must be one of visible, hidden, idle. state is missing or another value Send one of the three
no usable element matching selector within ns visible: it did not appear in time Wait longer, or check the selector with simulator_find
element selector disappearing did not happen within ns hidden: it was still there Wait longer
UI settling for ss did not happen within ns idle: the screen kept changing Wait longer, or use a selector instead

Plus the other selector errors, and the errors every Simulator tool can return: see start_simulator.

Example

{"name": "simulator_wait", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "state": "visible", "text": "Saved", "timeoutSeconds": 30}}