Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ADB_PATH | No | Path to ADB executable | adb |
| FFMPEG_PATH | No | Path to ffmpeg executable | ffmpeg |
| DEFAULT_MAX_FPS | No | Default maximum FPS for streaming | 30 |
| DEFAULT_MAX_SIZE | No | Default maximum size for streaming | 1024 |
| DEFAULT_FRAME_FPS | No | Default frame FPS for streaming | 2 |
| SCRCPY_SERVER_PATH | No | Path to the scrcpy-server file (required for streaming + fast input) | |
| SCRCPY_SERVER_VERSION | No | Version of scrcpy-server (must exactly match your scrcpy-server file) |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| android.devices.list | Returns the output of adb devices -l (parsed). |
| android.devices.info | Returns a subset of getprop values for a device. |
| android.vision.startStream | Uses scrcpy standalone server raw H.264 stream + ffmpeg decoding. Creates/updates resource android://device//frame/latest.jpg. |
| android.vision.stopStream | Stops scrcpy + ffmpeg pipeline and removes the frame resource. |
| android.vision.snapshot | Uses adb exec-out screencap -p. Works without scrcpy/ffmpeg. Returns image/png. |
| android.input.tap | Taps at coordinates (x,y). Uses fast scrcpy control protocol (~5ms) when stream is active, otherwise falls back to adb shell input (~100-300ms). |
| android.input.swipe | Swipes from (x1,y1) to (x2,y2). Uses fast scrcpy control protocol when stream is active, otherwise falls back to adb shell input. |
| android.input.text | Types text. Uses fast scrcpy text injection when stream is active (instant, no encoding issues), otherwise falls back to adb shell input text (slower, spaces encoded as %s). |
| android.input.keyevent | Sends a keycode event. Uses fast scrcpy control protocol when stream is active, otherwise falls back to adb shell input keyevent. Common keycodes: HOME=3, BACK=4, VOLUME_UP=24, VOLUME_DOWN=25, POWER=26, ENTER=66, DELETE=67. |
| android.input.longPress | Performs a long press at coordinates (x,y) for specified duration. Uses fast scrcpy control protocol when stream is active, otherwise falls back to adb shell input. |
| android.input.pinch | Simulates a pinch gesture at center point with specified distances. Note: This uses a single-finger swipe simulation. True multi-touch requires device-specific commands or scrcpy control protocol. Pinch in: startDistance > endDistance. Pinch out: startDistance < endDistance. |
| android.input.dragDrop | Drags from start coordinates to end coordinates. Uses adb shell input draganddrop on Android 7+, falls back to swipe on older versions. |
| android.app.start | Starts an Android app by package (optionally activity). |
| android.app.stop | Force-stops an Android app by package name. |
| android.ui.dump | Dumps the current UI hierarchy using uiautomator. Returns XML with all visible elements, their bounds [left,top][right,bottom], text, resource-id, content-desc, and class. Useful for finding tap targets. |
| android.ui.findElement | Finds UI elements in the current screen by text, resource-id, class, or content-desc. Returns matching elements with their center coordinates for easy tapping. |
| android.shell.exec | WARNING: Executes arbitrary shell command via adb shell. Can perform any operation on the device. Use with extreme caution. Returns stdout, stderr, and exit code. |
| android.file.push | WARNING: Transfers a local file to the device filesystem using adb push. Can modify device storage. Ensure paths are correct and you have proper permissions. Local path must exist and remote path must be writable. |
| android.file.pull | Transfers a file from the device to the local filesystem using adb pull. Remote path must exist and be readable. Local directory must be writable. |
| android.file.list | Lists files and directories on the device using adb shell ls -la. Returns detailed file information including permissions, ownership, size, and modification time. |
| android.clipboard.get | Retrieves the current clipboard content using dumpsys clipboard. Note: May have limitations on Android 10+ due to privacy restrictions. Returns empty string if clipboard is empty. |
| android.clipboard.set | Attempts to set clipboard content via ADB. WARNING: Direct clipboard setting is restricted on most Android devices due to security policies. This may not work reliably across all Android versions. Consider using UI automation to paste text instead as a fallback. |
| android.apps.list | Lists all installed packages using pm list packages. Can filter by system apps only, third-party apps only, or show all apps (default). |
| android.notifications.get | Dumps all current notifications using dumpsys notification --noredact. Returns detailed notification information including text, package names, and metadata. Note: May require special permissions on Android 10+ devices. |
| android.activity.current | Retrieves the currently focused/resumed activity and package name. Useful for determining which app is in the foreground. Returns package name and activity name. |
| android.screen.wake | Wakes the device screen using KEYCODE_WAKEUP (224). Turns on the screen if it's currently off. |
| android.screen.sleep | Puts the device screen to sleep using KEYCODE_SLEEP (223). Turns off the screen. |
| android.screen.isOn | Checks if the device screen is currently on using dumpsys power/display. Returns true if screen is on, false if off. |
| android.screen.unlock | Unlocks the device screen. First wakes the screen if off, then attempts to unlock using KEYCODE_MENU (82) or swipe gesture. WARNING: Only works for devices without secure lock (no PIN/password/pattern). Devices with secure locks cannot be unlocked via ADB for security reasons. |
| android.adb.connectWifi | Connects to an Android device over WiFi using ADB. Device must already have TCP/IP mode enabled (use android.adb.enableTcpip first while connected via USB). Default port is 5555. Use android.adb.getDeviceIp to get the device's IP address. |
| android.adb.disconnectWifi | Disconnects from a WiFi ADB connection. If ipAddress is provided, disconnects from that specific device. If omitted, disconnects from all WiFi devices. |
| android.adb.enableTcpip | Enables TCP/IP mode on the device for WiFi debugging. Device must be connected via USB first. Default port is 5555. After enabling, use android.adb.getDeviceIp to get the device's IP address, then use android.adb.connectWifi to connect wirelessly. You can then disconnect the USB cable. |
| android.adb.getDeviceIp | Gets the device's WiFi IP address. Useful for connecting to the device wirelessly after enabling TCP/IP mode. Returns the IP address or null if device is not connected to WiFi. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| android-devices | List of devices from adb devices -l |