list_emulators
Lists all currently running Android emulators for development and testing purposes.
Instructions
List all running Android Emulators
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/espresso_mcp/server.py:33-42 (handler)The handler function for the 'list_emulators' tool. It runs 'adb devices' to list running Android emulators, parses the output to extract emulator IDs, and returns them as a list.@mcp.tool() def list_emulators() -> list: """List all running Android Emulators""" result = subprocess.run(["adb", "devices"], capture_output=True, text=True) if result.returncode != 0: raise RuntimeError(f"Error listing emulators: {result.stderr}") lines = result.stdout.splitlines() print("---lines", lines) emulators = [line.split()[0] for line in lines[1:] if "emulator" in line] return emulators
- src/espresso_mcp/server.py:33-33 (registration)The @mcp.tool() decorator registers the list_emulators function as an MCP tool.@mcp.tool()