Skip to main content
Glama

clear_app_data

Clear all app data to reset an Android application to its fresh install state using package name and optional device serial.

Instructions

Clear all data for an app (like fresh install)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes
device_serialNo

Implementation Reference

  • The handler function for the 'clear_app_data' tool, registered via the @mcp.tool() decorator. It clears all application data (equivalent to a fresh install) using the ADB 'pm clear' command on the specified package name and optional device.
    @mcp.tool() def clear_app_data(package_name: str, device_serial: str | None = None) -> str: """Clear all data for an app (like fresh install)""" return run_adb(["shell", "pm", "clear", package_name], device_serial)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server