Devicely

v2.4.10
io.github.sureshkumarm8/devicely Checked 4 days ago Published 21 days ago

Control real iOS & Android devices from AI agents; mirror one tap across a whole fleet.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

devicely_list_devices

List all devices managed by Devicely (physical phones, Android emulators, iOS simulators), including platform, model, connection type, status, and whether agent control is allowed. Prefer calling this first to discover available device identifiers.

ParameterTypeDescription
includeStoppedbooleanWhether to include stopped emulators and simulators in the list

devicely_connect_device

Initiate connection and start automation drivers (UIAutomator2 for Android, WebDriverAgent for iOS) on a target device. Idempotent: returns immediately if already connected. First-time iOS start may take 10-60s.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID

devicely_disconnect_device

Disconnect automation driver sessions from a device. Safe and idempotent.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID

devicely_restart_device

Reboot/restart connected mobile device(s). Destructive action gated by user policy. Use only when troubleshooting frozen system state.

ParameterTypeDescription
devices *stringTarget device name, serial, or UDID

devicely_set_passcode

Set the screen-lock passcode/PIN on connected devices (default: every online device). Android is set via adb and verified on the device. iOS cannot be set programmatically: those devices return NOT_SUPPORTED_ON_IOS with the manual Settings steps - do not try to work around it with taps.

ParameterTypeDescription
passcode *stringNew numeric passcode, 4-16 digits (e.g. "111111")
devicesTarget device(s); defaults to "online" (all connected devices)
oldPasscodestringCurrent PIN, required when the device already has a screen lock

devicely_snapshot

Capture device screen state. Returns a downscaled JPEG screenshot (image content) and/or pruned interactive UI element tree with stable references (e.g. e1, e2). Prefer this before acting. Use returned element refs or coordinates directly in devicely_tap.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID
includearrayComponents to capture: "image" (screenshot), "elements" (interactive UI tree), or both
interactiveOnlybooleanPrune non-interactive containers to keep tokens minimal (default true)
maxEdgenumberMaximum pixel dimension for screenshot long edge
maxElementsnumberMaximum UI elements to return (capped at 500)
querystringFilter UI elements by text, ID, or label substring

devicely_find_elements

Fast, cheap lookup of UI elements by text or ID without capturing or transferring screenshot images. Useful for checking if buttons or labels are currently present.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID
query *stringText, label, or resource ID to search for
maxnumberMax elements to return

devicely_tap

Tap an element or coordinate on one or more devices in parallel. Specify target by element ref (e.g. "e1"), text label, ID, or (x, y) coordinates. Set returnSnapshot=true to receive fresh post-tap screen verification in the same turn.

ParameterTypeDescription
target *Target element locator or coordinate
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array
returnSnapshotbooleanReturn fresh screenshot and UI tree immediately after tap

devicely_long_press

Long-press on a target element or coordinate for a specified duration (default 800ms). Supports context menus and drag triggers.

ParameterTypeDescription
target *Target element locator or coordinate
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array
durationMsnumberPress duration in milliseconds

devicely_swipe

Perform a directional swipe or scroll on devices. Specify direction ("up", "down", "left", "right") or explicit start/end coordinates.

ParameterTypeDescription
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array
directionstringSwipe direction
distancenumberRelative swipe distance (0.1 to 1.0)
durationMsnumberDuration of swipe motion in ms
fromStart target/coordinate
toEnd target/coordinate

devicely_type_text

Type text into the currently focused input or into a specific target element. When sensitive=true, input is masked in audit logs and dashboard view for security.

ParameterTypeDescription
text *stringText string to type into the field
clearFirstbooleanClear existing text before typing
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array
sensitivebooleanMask text in audit logs and dashboard UI
submitbooleanPress enter/return after typing
targetOptional target input field to focus first before typing

devicely_press_key

Send standard hardware or system navigation keys to device(s): home, back, enter, recent (app switcher), lock, unlock, notifications, quicksettings, volume_up, volume_down.

ParameterTypeDescription
key *stringSystem key verb to press
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array

devicely_launch_app

Launch an application on target device(s) by app name (e.g. "settings", "camera", "youtube") or bundle/package ID (e.g. "com.android.settings", "com.apple.Preferences").

ParameterTypeDescription
app *stringFriendly application name or bundle/package ID
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array

devicely_close_app

Terminate/kill a running application on target device(s).

ParameterTypeDescription
app *stringApplication name or package/bundle ID to kill
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array

devicely_open_url

Open a URL or custom deep link on target device(s) using system browser or app handler. Only http, https, and recognized app schemes are allowed.

ParameterTypeDescription
url *stringHTTP/HTTPS or app deep link URL to open
devicestringTarget device name, serial, or UDID (alias for devices)
devicesTarget device(s): name, serial, UDID, or array

devicely_wait_for

Deterministic wait condition on a device. Polls until an element becomes visible, disappears, or text appears on screen. Capped at 60s.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID
target *Target element ref, ID, or text to monitor
conditionstringCondition to await: "visible" (element appears), "gone" (element disappears), "text_present"
timeoutMsnumberMaximum wait timeout in milliseconds (max 60000ms)

devicely_run_commands

Execute a multi-line Devicely DSL automation script across devices. Supports commands: tap <target>, longpress <target> <ms>, swipe <dir>, type "<text>", launch <app>, kill <app>, home, back, enter, url <url>, WAIT <ms>. Comments start with #.

ParameterTypeDescription
commands *stringMulti-line Devicely DSL commands string
devices *
stopOnErrorbooleanHalt execution if any step fails

devicely_export_test

Export a saved Devicely recording into a standard zero-AI CI test script. Supported frameworks: maestro (declarative YAML), appium-python (Pytest class), appium-java (JUnit 5 class), webdriverio (Mocha JS spec).

ParameterTypeDescription
recordingName *stringName of the saved recording to export
formatstringTarget test framework format

devicely_commander

Manage Devicely Commander Mode (leader-follower mirroring). Actions performed on the commander leader device are automatically scaled and broadcast to all follower devices.

ParameterTypeDescription
action *stringCommander action to perform
devicestringTarget device name for start (as commander) or add/remove follower

devicely_list_recordings

List all saved Devicely test recordings available for replay.

devicely_save_recording

Save an action sequence or recent session history into a reusable Devicely recording file.

ParameterTypeDescription
name *stringRecording name to save
dslstringDevicely DSL commands to save; omit to save successful actions from the current backend session

devicely_replay_recording

Replay a previously saved Devicely recording across target device(s). Executes commands sequentially or with independent device lanes with progress reporting.

ParameterTypeDescription
devices *
name *stringRecording to replay: its filename (with or without .json) or the name it was saved under (newest wins if several share it)
autoWaitTimeoutMsnumberAuto-wait timeout per step in milliseconds (default 10000)
evidencestringEvidence capture level: "off", "failures", or "all"
fromStepnumberStart replaying from this 0-indexed step
retriesnumberNumber of retry attempts per failed step (default 1)
stopOnFailurebooleanStop replay on first failure
timingstringReplay timing mode: "fast" or "recorded"

devicely_get_replay_run

Retrieve details, steps, timings, evidence, and healing suggestions for a specific replay run or the latest run of a flow.

ParameterTypeDescription
flowstringFlow name or filename to look up latest run for when runId is omitted
runIdstringRun ID to look up; omit or pass "latest" to retrieve latest run for the specified flow

devicely_list_replay_runs

List previous replay run records with summary stats, outcomes, and timings.

ParameterTypeDescription
flowstringFilter runs by flow filename or name
limitnumberMaximum number of runs to return (default 20)

devicely_get_action_log

Retrieve verified action history with precise locators, coordinates, and timings. Can export in JSON, Devicely DSL, or runnable Appium test code (JavaScript/Java) following the dynamic-first, coordinate-fallback pattern.

ParameterTypeDescription
devicestringFilter action log to a specific device
formatstringOutput format: "json", "dsl", "appium-js", or "appium-java"
sincenumberFilter actions occurred after this Unix timestamp in ms

devicely_list_apps

List installed third-party or system applications and package bundle IDs on target device.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID
querystringFilter by package or app name substring

devicely_install_app

Install an application package (.apk, .ipa, .app) from the host machine onto target devices. Destructive action gated by user policy.

ParameterTypeDescription
devices *
path *stringAbsolute file path on host machine to the application package

devicely_uninstall_app

Uninstall an application by package ID or bundle name. Destructive action gated by user policy.

ParameterTypeDescription
app *stringPackage ID or bundle name to uninstall
devices *

devicely_doctor

Run environment and toolchain diagnostics on the Devicely host: Node, adb (+ mDNS), Python, Xcode (full vs Command Line Tools), libimobiledevice, iproxy, WebDriverAgent, emulators and simulators. Returns what is ready (readyFor) and the exact fix command for anything missing.

devicely_get_device_logs

Retrieve recent system log lines (logcat on Android, simctl log on iOS Simulator; a short live idevicesyslog capture on USB iPhones) for diagnostics or debugging crash stack traces.

ParameterTypeDescription
device *stringTarget device name, serial, or UDID
grepstringRegex or string filter for log lines
linesnumberNumber of recent log lines to fetch (max 1000)

devicely_launch_virtual_device

Boot an Android Virtual Device (AVD) emulator or iOS Simulator. Booting runs in the background and the device is connected automatically when ready; poll devicely_list_devices.

ParameterTypeDescription
name *stringEmulator AVD name or simulator UDID/name
platform *stringPlatform: "android" or "ios"
headlessbooleanRun Android emulator in headless mode (-no-window)

devicely_stop_virtual_device

Shutdown/stop a running Android emulator or iOS Simulator. Destructive action gated by user policy.

ParameterTypeDescription
name *stringVirtual device name, serial, or UDID to terminate
platform *stringPlatform: "android" or "ios"