Skip to main content
Glama

Clear app data

clear_app_data
DestructiveIdempotent

Wipe an Android app's data and cache to reset it to a first-launch state, enabling reproducible onboarding and permission flows from scratch.

Instructions

Wipe an app's data and cache (pm clear) to reset it to a first-launch state — the fastest way to reproduce onboarding/permission flows from scratch.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "package": "<package>"
    },
    "name": "clear_app_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
packageYesApplication package name (e.g. com.example.app).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, so the bar is lower; the description still adds real value by stating exactly what is erased (data and cache) and what state the app lands in (first launch). It stops short of noting that login state, permissions, and local databases are irrecoverably lost, which is the main risk an agent should consider.

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?

A single sentence, front-loaded with the action and mechanism, followed by the outcome and the use case. No redundant restatement of the title and nothing wasted.

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 destructive tool with full schema coverage and no output schema, the description covers action, mechanism, and result state adequately. Only the loss of authentication/onboarding-adjacent state is left implicit, a minor gap given the destructiveHint annotation.

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 coverage is 100% — both parameters, including the optional serial fallback behavior, are documented in the schema itself. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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 gives a specific verb+resource ('Wipe an app's data and cache'), the underlying mechanism (pm clear), and the resulting state ('first-launch state'). This clearly separates it from siblings like stop_app, reload_app, and uninstall_app, which do not remove stored data.

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

Usage Guidelines4/5

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

It provides a concrete usage context: reproducing onboarding/permission flows from scratch. However, it never names an alternative or exclusion — e.g. that uninstall_app or revoke_permission are different choices when you want to remove the app or just drop a grant — so the agent must infer when this is preferable.

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