DroidMind MCP Tool Reference¶
Welcome to the DroidMind MCP Tool Reference. This section provides a quick overview of all the tools DroidMind exposes to your AI assistant via the Model Context Protocol (MCP).
Each tool is designed to perform a specific action on your connected Android devices. Your AI assistant intelligently chooses and combines these tools based on your natural language requests.
🛠️ Available Tools¶
Below is a categorized list of DroidMind tools. For detailed parameters, refer to the specific tool documentation (future enhancement) or explore them through an MCP-compatible client that can list tool schemas (like the MCP Inspector or potentially your AI assistant itself).
Device Connection & Management¶
android-device
: Performs various device management operations on Android devices.action
: Specifies the operation. One of:list_devices
: Lists all connected Android devices and their basic information.- No specific arguments required beyond
ctx
. connect_device
: Connects to an Android device over TCP/IP (Wi-Fi).- Requires:
ip_address
. - Optional:
port
(default 5555). disconnect_device
: Disconnects from a specified Android device.- Requires:
serial
. device_properties
: Retrieves detailed system properties of a specific device.- Requires:
serial
. reboot_device
: Reboots a device into normal, recovery, or bootloader mode.- Requires:
serial
. - Optional:
mode
(defaultnormal
; e.g.,recovery
,bootloader
).
ctx
: MCP Context.serial
(optional): Device serial number. See specificaction
for usage.ip_address
(optional): IP address forconnect_device
.port
(optional): Port forconnect_device
.mode
(optional): Reboot mode forreboot_device
.- Note: Refer to the tool's main Python docstring in
droidmind/tools/device_management.py
for the most detailed argument requirements for eachaction
.
Diagnostics & Logging¶
-
android-diag
: Performs diagnostic operations like capturing bug reports or heap dumps. -
serial
: Device serial number. action
: Specifies the diagnostic operation. One of:capture_bugreport
: Captures a comprehensive bug report from the device.- Optional:
output_path
(host path for adb to write .zip, temp if empty),include_screenshots
(defaultTrue
),timeout_seconds
(default300s
). dump_heap
: Captures a heap dump from a running process.- Requires:
package_or_pid
(app package name or process ID). - Optional:
output_path
(local path for .hprof, temp if empty),native
(defaultFalse
for Java heap),timeout_seconds
(default120s
).
ctx
: MCP Context.output_path
(optional): Path for output file. See action specifics.include_screenshots
(optional): Forcapture_bugreport
.package_or_pid
(optional): Fordump_heap
.native
(optional): Fordump_heap
.timeout_seconds
(optional): Override default timeouts. If 0, action-specific defaults are used.-
Note: Refer to the tool's main Python docstring in
droidmind/tools/diagnostics.py
for detailed argument requirements. -
android-log
: Performs various log retrieval operations on an Android device. serial
: Device serial number.action
: Specifies the operation. One of:get_device_logcat
: Fetches general logcat output from a device.- Optional:
lines
,filter_expr
,buffer
,format_type
,max_size
. get_app_logs
: Fetches logcat output filtered for a specific application.- Requires:
package
. - Optional:
lines
. get_anr_logs
: Retrieves Application Not Responding (ANR) traces.- No specific arguments beyond
serial
andctx
. get_crash_logs
: Fetches application crash reports.- No specific arguments beyond
serial
andctx
. get_battery_stats
: Gets battery statistics and history.- No specific arguments beyond
serial
andctx
.
ctx
: MCP Context.package
(optional): Package name forget_app_logs
.lines
(optional): Number of lines for logcat actions.filter_expr
(optional): Filter forget_device_logcat
.buffer
(optional): Logcat buffer forget_device_logcat
.format_type
(optional): Output format forget_device_logcat
.max_size
(optional): Max output size forget_device_logcat
.- Note: Refer to the tool's main Python docstring in
droidmind/tools/logs.py
for detailed argument requirements.
File System Operations¶
android-file
: Performs a variety of file and directory operations on an Android device.serial
: Device serial number.action
: Specifies the operation. One of:list_directory
: Lists contents of a directory on the device.- Requires:
path
(directory path on device). push_file
: Uploads a file from the DroidMind server's machine to the device.- Requires:
local_path
(source on server),device_path
(destination on device). pull_file
: Downloads a file from the device to the DroidMind server's machine.- Requires:
device_path
(source on device),local_path
(destination on server). delete_file
: Deletes a file or directory.- Requires:
path
(path to delete on device). create_directory
: Creates a directory.- Requires:
path
(directory path to create on device). file_exists
: Checks if a file or directory exists.- Requires:
path
(path to check on device). Returns:bool
. read_file
: Reads file content.- Requires:
device_path
(orpath
) for the file on device. - Optional:
max_size
(defaults to 100KB). write_file
: Writes content to a file.- Requires:
device_path
(orpath
) for the file on device,content
(text to write). file_stats
: Gets file/directory statistics.- Requires:
path
(path on device).
ctx
: MCP Context.path
(optional): General device path. See specificaction
for usage.local_path
(optional): Server-side path forpush_file
/pull_file
.device_path
(optional): Device-side path. See specificaction
for usage. Takes precedence overpath
if both are provided for read/write.content
(optional): Text content forwrite_file
.max_size
(optional): Max size forread_file
.- Note: Refer to the tool's main Python docstring in
droidmind/tools/file_operations.py
for the most detailed argument requirements for eachaction
.
Application Management¶
android-app
: Performs various application management operations on an Android device.serial
: Device serial number.action
: Specifies the operation. One of:install_app
: Installs an APK on the device.- Requires:
apk_path
(local path to APK on DroidMind server). - Optional:
reinstall
(defaultFalse
),grant_permissions
(defaultTrue
). uninstall_app
: Uninstalls an application from the device.- Requires:
package
(package name). - Optional:
keep_data
(defaultFalse
). start_app
: Starts an application.- Requires:
package
(package name). - Optional:
activity
(specific activity to launch). stop_app
: Force stops an application.- Requires:
package
(package name). clear_app_data
: Clears data and cache for an application.- Requires:
package
(package name). list_packages
: Lists installed application packages.- Optional:
include_system_apps
(defaultFalse
). get_app_manifest
: Gets the AndroidManifest.xml contents for an app.- Requires:
package
(package name). get_app_permissions
: Gets permissions used by an app, including runtime status.- Requires:
package
(package name). get_app_activities
: Gets the activities defined in an app, including intent filters and main activity.- Requires:
package
(package name). get_app_info
: Retrieves detailed information about an installed application.- Requires:
package
(package name).
ctx
: MCP Context.package
(optional): Package name. See specificaction
for usage.apk_path
(optional): Local path to APK forinstall_app
.reinstall
(optional): Forinstall_app
.grant_permissions
(optional): Forinstall_app
.keep_data
(optional): Foruninstall_app
.activity
(optional): Specific activity forstart_app
.include_system_apps
(optional): Forlist_packages
.- Note: Refer to the tool's main Python docstring in
droidmind/tools/app_management.py
for the most detailed argument requirements for eachaction
.
Shell Command Execution¶
android-shell
: Executes an arbitrary shell command on the device.serial
: Device serial number.command
: The shell command string.max_lines
(optional): Limit output lines.max_size
(optional): Limit output characters.
UI Automation¶
-
android-ui
: Performs various UI interaction operations on an Android device. -
serial
: Device serial number. action
: Specifies the UI operation. One of:tap
: Simulates a tap at specified screen coordinates.- Requires:
x
,y
(coordinates to tap). swipe
: Simulates a swipe gesture.- Requires:
start_x
,start_y
,end_x
,end_y
(swipe coordinates). - Optional:
duration_ms
(swipe duration, default 300ms). input_text
: Inputs text into the currently focused field.- Requires:
text
(text to input). press_key
: Simulates pressing an Android keycode.- Requires:
keycode
(Android keycode, e.g., 3 for HOME, 4 for BACK). start_intent
: Starts an app activity using an intent.- Requires:
package
(package name),activity
(activity name, relative or fully qualified). - Optional:
extras
(dictionary of intent extras).
ctx
: MCP Context.x
(optional): X coordinate fortap
.y
(optional): Y coordinate fortap
.start_x
(optional): Starting X forswipe
.start_y
(optional): Starting Y forswipe
.end_x
(optional): Ending X forswipe
.end_y
(optional): Ending Y forswipe
.duration_ms
(optional): Duration forswipe
.text
(optional): Text forinput_text
.keycode
(optional): Keycode forpress_key
.package
(optional): Package name forstart_intent
.activity
(optional): Activity name forstart_intent
.extras
(optional): Dictionary forstart_intent
.-
Note: Refer to the tool's main Python docstring in
droidmind/tools/ui.py
for the most detailed argument requirements for eachaction
. -
android-screenshot
: Captures a screenshot from the device. serial
: Device serial number.quality
(optional): JPEG quality (1-100, default 75).
This reference provides a quick lookup for the tools DroidMind offers. Your AI assistant will use these to fulfill your requests for interacting with your Android devices.