Skip to main content
Glama

adb_clear_data

Clears all data for an Android app package, including cache, databases, preferences, and login state; requires confirm matching the package name to prevent accidental data loss.

Instructions

Clear all data for a package (equivalent to clearing storage in settings). DESTRUCTIVE — irreversibly wipes all app data, cache, databases, shared preferences, and login state. AP5 fix: requires confirm: <packageName> to proceed.

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": {
      "packageName": "<packageName>"
    },
    "name": "adb_clear_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial
confirmNoMust equal packageName to confirm the destructive operation. AP5 fix: prevents accidental data loss from misclicks/mistyped invocations.
packageNameYesPackage name (e.g., 'com.example.app')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Must equal packageName to confirm the destructive operation. AP5 fix: prevents accidental data loss from misclicks/mistyped invocations.",
      +  "type": "string"
      +}
    • changedInput schema / properties / packageName / description
      Previous value: -"Package name"New value: +"Package name (e.g., 'com.example.app')"
  3. First observedv1.1.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it well: it flags irreversibility, enumerates what is wiped (data, cache, databases, shared preferences, login state), and documents the confirm gate. Gaps remain on side effects such as whether the app is force-stopped or runtime permissions revoked, and how the device parameter is resolved when omitted.

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 destructive warning and what gets destroyed, then the safety gate — a good order with almost no waste. The 'AP5 fix:' tag is internal jargon that costs a few tokens without informing the agent.

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 destructive, annotation-free mutation with three params and no output schema, the description covers the essentials: destructiveness, scope of loss, and the confirmation requirement. It falls short only on device targeting and post-clear app state.

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%, so the schema already explains all three parameters including the confirm-equals-packageName rule. The description only restates the confirm requirement, adding emphasis rather than new semantics, which matches the baseline 3.

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?

States a specific verb and resource ('Clear all data for a package') and anchors it to a familiar operation ('equivalent to clearing storage in settings'), which cleanly separates it from siblings like adb_uninstall, adb_force_stop, or adb_rm.

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?

The settings analogy implies the scenario (resetting an app to first-run state), but there is no explicit when-to-use/when-not guidance and no mention of the obvious alternatives such as uninstall/reinstall or force-stop for less drastic resets.

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

Deploy Server

Other Tools