Skip to main content
Glama

Clear app data

clear_app_data
DestructiveIdempotent

Deletes all data stored by an Android app via pm clear. The server checks an allowlist and refuses unless the package is approved.

Instructions

Delete all data stored by an app (pm clear <package>). Destructive and allowlist-gated: the server refuses unless the package is listed in ADBMCP_CLEAR_ALLOWED_PACKAGES (comma-separated); an unset or empty value refuses every clear.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, yet the description still adds substantial non-redundant detail: exactly what is destroyed ('all data stored by an app'), that it is allowlist-gated via a named env var, and that the failure mode is fail-closed on unset/empty values. This is exactly the extra behavioral context the annotations cannot convey.

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?

Two dense sentences, front-loading the destructive action before the gating condition. No filler, no repetition of the title or schema.

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

Completeness5/5

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

For a destructive mutation with no output schema, the description covers the action, the destruction scope, and the authorization gate, while annotations cover the safety profile and the schema covers both parameters. Nothing an agent needs to call this correctly 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 both the device and package parameters are already documented with examples in the schema. The description only echoes the package parameter via the `pm clear <package>` form and adds no syntax or format detail beyond it, so the baseline of 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?

States a specific verb+resource ('Delete all data stored by an app') and anchors it to the underlying mechanism (`pm clear <package>`), which cleanly separates it from siblings like force_stop_app and uninstall_package.

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?

Gives a clear precondition for invocation (package must be present in ADBMCP_CLEAR_ALLOWED_PACKAGES, empty/unset refuses everything), which tells the agent when the call will succeed. It does not, however, name alternative tools such as uninstall_package for when full removal is intended, so routing guidance is incomplete but context is strong.

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