run-sequence
Execute multiple predefined device interaction steps sequentially in one call, waiting for screen changes and stopping on failure. Use it for known chains like repeated scrolls or typing then Enter.
Instructions
Run several device interaction steps in one call.
Use when every step is known in advance (e.g. several scrolls, or typing then enter). If a step depends on what an earlier one shows, make separate calls.
Steps run in order. After a step that can change the screen, the next one waits up to 1000ms for the element tree to settle (see settle); keep an await-ui-element before a step that needs the new screen.
If a step fails (an error, a tool not allowed or not supported on the target, or a wait step that returns success=false), the sequence stops there. Returns { completed, total, steps } with a result or error for each step that ran.
One screenshot and element tree are captured after the last step, not per step. A {{secret:...}} in any step skips that capture, so type and submit a secret in one sequence.
Allowed tools, args (? = optional) and targets. Positions and distances are 0–1 fractions of the screen (window on Chromium), not pixels; angles in degrees, durations in ms. gesture-tap: x, y, clickCount? [ios/android/chromium] gesture-swipe: fromX, fromY, toX, toY, durationMs?, momentum? [ios/android] gesture-scroll: x, y, deltaX?, deltaY? (positive scrolls down), durationMs? [chromium] gesture-drag: fromX, fromY, toX, toY, durationMs?, momentum? [chromium] gesture-custom: events: [{ type: "Down"|"Move"|"Up", x, y, x2?, y2?, delayMs? }], interpolate?, edge? [ios/android] gesture-pinch: centerX, centerY, startDistance, endDistance, endCenterX?, endCenterY?, angle?, durationMs? [ios/android] gesture-rotate: centerX, centerY, startAngle, endAngle, radius (or radiusX + radiusY), durationMs? [ios/android] button: button: "home"|"back"|"power"|"volumeUp"|"volumeDown"|"appSwitch"|"actionButton" [ios/android] keyboard: text? or key? (one per step, e.g. key "enter"), delayMs?; text may hold {{secret:}} placeholders, resolved server-side [all; Apple TV/Android TV: text only] paste: text (only where a user would paste, e.g. an OTP) [ios sim/android emu] rotate: orientation: "Portrait"|"LandscapeLeft"|"LandscapeRight"|"PortraitUpsideDown" [ios sim/android] shake: count? [ios sim/android emu] fold: posture? "closed"|"half-open"|"open" or angle? 0–180 (later steps land on the new panel) [foldable ios sim/android emu] tv-remote: button (one, or an array run as a path), repeat? [apple tv/android tv/vega] await-ui-element: condition: "exists"|"visible"|"hidden"|"text", selector: { text?, identifier?, role? }, expectedText?, textMatch?, timeoutMs?, pollIntervalMs? [all] await-network-request: bundleId, url, plus the standalone tool's optional args. Call network-capture-start before the sequence. [ios sim/android/chromium]
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"udid": "<udid>",
"steps": "<steps>"
},
"name": "run-sequence"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id), shared across all steps. | |
| steps | Yes | Ordered list of interaction steps to execute sequentially | |
| settle | No | Wait up to 1000ms after a screen-changing step for the element tree to settle before the next step. Default true; set false on a screen that never stops changing. |