open_uri
Open URIs on Android devices to launch apps, websites, or content directly from the espresso-mcp server.
Instructions
Open a URI on the connected Android device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes |
Implementation Reference
- src/espresso_mcp/server.py:89-100 (handler)The handler function for the 'open_uri' tool. It uses adb to start an Android intent to view the given URI on the connected device.@mcp.tool() def open_uri(uri: str) -> str: """Open a URI on the connected Android device""" result = subprocess.run( ["adb", "shell", "am", "start", "-a", "android.intent.action.VIEW", "-d", uri], capture_output=True, text=True, ) if result.returncode != 0: raise RuntimeError(f"Error opening URI '{uri}': {result.stderr}") return f"URI '{uri}' has been opened successfully."