list_apps
Display all installed applications on a connected Android device to manage or audit software inventory.
Instructions
List all installed apps on the connected Android device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/espresso_mcp/server.py:102-111 (handler)The handler function for the 'list_apps' tool, decorated with @mcp.tool(). It executes 'adb shell pm list packages' to list installed apps on the Android device and processes the output into a list of package names.@mcp.tool() def list_apps() -> list: """List all installed apps on the connected Android device""" result = subprocess.run( ["adb", "shell", "pm", "list", "packages"], capture_output=True, text=True ) if result.returncode != 0: raise RuntimeError(f"Error listing installed apps: {result.stderr}") apps = [line.replace("package:", "").strip() for line in result.stdout.splitlines()] return apps