Skip to main content
Glama

Force-stop an app

force_stop_app
Idempotent

Stop all processes of an Android app package by name on a specified device using adb am force-stop. Safe to call even if the app is not running.

Instructions

Stop all processes of a package on one device (am force-stop). Idempotent; safe to call when the app is not running.

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial from list_devices; optional when exactly one device is connected.
packageYesPackage name to stop, e.g. "com.example.app".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, so the safety profile is covered. The description largely repeats idempotency but adds that it is safe to invoke when the app is not running, a modest behavioral detail. No contradiction with annotations.

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

Conciseness4/5

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

Two short sentences, front-loaded with the action and implementation hint. The idempotency clause borders on redundancy with the annotation but is concise enough to warrant its place.

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

Completeness4/5

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

For a simple two-parameter tool whose annotations carry the safety profile and whose schema documents all parameters, the description covers what is needed. It does not restate device-selection behavior, but the schema already handles that.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters are documented in the schema itself. The description only adds 'on one device' as loose context and does not explain parameter syntax or format beyond what the schema provides.

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 gives a specific verb and resource ('Stop all processes of a package on one device') with an implementation hint (`am force-stop`). It naturally distinguishes from siblings like clear_app_data and uninstall_package by action, though it does not name them explicitly, so it falls just short of a 5.

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

Usage Guidelines3/5

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

'Safe to call when the app is not running' gives one usage condition, which is useful context. However, it offers no guidance on when to prefer this over alternatives such as uninstall_package or clear_app_data, leaving selection to inference.

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