Skip to main content
Glama

android_close_app

Destructive

Close an app on the Android device (safe method: HOME key + am kill). Never uses am force-stop (corrupts PackageManager). Example: 'com.whatsapp'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYesAndroid package name to close (e.g., 'com.whatsapp')
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
channel_account_idNoAndroid device channel_account ID. Omit when the workspace has a single Android device; REQUIRED when it has more than one (e.g. WhatsApp + LINE), else the call is rejected as ambiguous.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • addedInput schema / properties / channel_account_id
      Added value: +{
      +  "description": "Android device channel_account ID. Omit when the workspace has a single Android device; REQUIRED when it has more than one (e.g. WhatsApp + LINE), else the call is rejected as ambiguous.",
      +  "type": "integer"
      +}
  5. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and openWorldHint=true, so safety is covered. The description adds genuine non-obvious context by disclosing the implementation strategy (HOME key + am kill, never am force-stop because it corrupts PackageManager), which tells the agent what actually happens to the device state.

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?

Front-loaded with the core action, followed by a compact parenthetical on the safe method and an example. Every element is short and purposeful, though the example clause is slightly redundant with the schema's own package example.

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 single-action device control tool with no output schema and full parameter coverage, the description supplies purpose, method, and the key safety caveat. It omits edge cases such as behavior when the app isn't installed or running, but nothing critical for correct invocation is missing.

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 the schema already documents package, in_workspace, and channel_account_id in detail. The description only repeats the package example ('com.whatsapp'), which the schema already supplies, adding nothing extra. Baseline 3 applies when the schema does the heavy lifting.

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

Purpose5/5

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

The description states a specific verb (close) and resource (an app on the Android device), making it immediately distinguishable from siblings like android_launch_app or android_current_app. The scope and effect are unambiguous without opening any schema.

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?

It clarifies the internal mechanism and rules out am force-stop, but never states when to prefer this over android_shell or other alternatives, nor any prerequisites (e.g. app must be running). Usage is implied rather than guided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.