run_flow
Executes a declarative sequence of mobile UI steps in one server-side call, auto-waiting for elements and stopping on failure to return the failing step and UI tree.
Instructions
Run a declarative flow of UI steps server-side in a single call, using a subset of Maestro's YAML syntax. Steps auto-wait for their elements (no manual sleeps); execution stops at the first failure and returns the failing step plus the current UI tree so the caller can take over from there. Commands: launchApp, tapOn, doubleTapOn, longPressOn, inputText, eraseText, assertVisible, assertNotVisible, extendedWaitUntil, scrollUntilVisible, swipe, back, pressKey, hideKeyboard, waitForAnimationToEnd, stopApp, clearState, openLink, runFlow (inline commands or file: for composing flow files, with when: visible/notVisible/platform — use it to handle known popups), repeat (times and/or while: visible/notVisible). Selectors: text/id/type match as case-insensitive substrings, index picks the Nth match (0-based), optional: true skips instead of failing. Flows support ${VAR} placeholders resolved from the env parameter (or header env defaults). A Maestro-style header (appId: ... env: ... --- ...) is supported in YAML flows; runFlow file: paths resolve relative to the referencing flow file.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Variables for ${VAR} placeholders in the flow, e.g. {"ROUTE_ID": "123"}. Overrides header env defaults. | |
| steps | No | Flow as a JSON array of step objects, e.g. [{"tapOn": {"id": "fab"}}, {"assertVisible": "Done"}] | |
| app_id | No | Default appId for launchApp/stopApp/clearState steps (overrides the YAML header) | |
| dry_run | No | If true, only parse and list the steps — no device needed | |
| observe | No | Capture screen state after a successful run. Default: none | |
| platform | No | Target platform. Inferred if omitted. | |
| device_id | No | Device ID. Omit for the connected device. | |
| flow_file | No | Absolute path to a .yaml flow file (same syntax as flow_yaml) | |
| flow_yaml | No | Flow in Maestro-subset YAML (steps list, optional appId header) | |
| default_timeout_ms | No | Auto-wait budget per element lookup. Default: 10000 | |
| dismiss_dev_overlays | No | Clear React Native LogBox overlays before running. They intercept taps aimed at the app underneath, and a release build has none, so this is a no-op there. Kept out of the YAML so flows stay portable to Maestro. Default: true |