execute_dsl
Execute a batch of DSL commands on a mobile device to perform actions like tap, type, swipe, observe, launch apps, and assertions, enabling full device automation.
Instructions
Execute a batch of DSL commands on a device. This is the primary tool for all device interaction — tap, type, swipe, observe, launch apps, assertions, web automation, and more.
You MUST read the MCP resource mobai://reference/device-automation to learn how to control devices before using this tool.
Input: JSON string with "version": "0.2" and "steps" array. Example: {"version":"0.2","steps":[ {"action":"open_app","bundle_id":"com.apple.Preferences"}, {"action":"tap","predicate":{"text_contains":"Wi-Fi"}}, {"action":"wait_for","predicate":{"type":"switch"},"timeout_ms":3000} ]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | Device ID | |
| commands | Yes | DSL script as JSON string with version and steps |