Skip to main content
Glama

stop_app

Stop an app on a connected Android device by specifying its package name. Use this tool to terminate running applications for testing or management purposes.

Instructions

Stop an app on the connected Android device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes

Implementation Reference

  • The handler function for the 'stop_app' MCP tool. It executes 'adb shell am force-stop' to stop the Android app with the given package_name. Registered via @mcp.tool() decorator, with input schema inferred from type hints (package_name: str) and output str.
    @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."

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vs4vijay/espresso-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server