stop_app
Stop a running Android app by specifying its package name using the automated espresso-mcp server.
Instructions
Stop an app on the connected Android device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes |
Implementation Reference
- src/espresso_mcp/server.py:136-146 (handler)The handler function for the 'stop_app' tool, decorated with @mcp.tool() for registration. It uses adb to force-stop the specified Android app package.@mcp.tool() def stop_app(package_name: str) -> str: """Stop an app on the connected Android device""" result = subprocess.run( ["adb", "shell", "am", "force-stop", package_name], capture_output=True, text=True, ) if result.returncode != 0: raise RuntimeError(f"Error stopping app '{package_name}': {result.stderr}") return f"App '{package_name}' has been stopped successfully."