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."
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation action ('Stop') but doesn't specify if this requires specific permissions, whether it's reversible, what happens to app data, or error conditions. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of stopping an app (a mutation action), no annotations, no output schema, and incomplete parameter documentation, the description is inadequate. It should explain more about behavior, outcomes, and parameter usage to be complete for this context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, and the tool description adds no information about the 'package_name' parameter beyond what's implied by the title. It doesn't explain what a package name is, provide examples, or mention format requirements, failing to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Stop') and target ('an app on the connected Android device'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'kill_emulator' or 'uninstall_app', which might also stop apps in different ways, so it lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'kill_emulator' or 'uninstall_app', nor does it mention prerequisites such as needing a connected Android device or app installation status. It only states what the tool does without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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