Skip to main content
Glama

clear_app_data

Clear app data for a specific Android application on a connected device by providing its package name.

Instructions

Clear app data for a specific app on the connected Android device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes

Implementation Reference

  • The handler function for the 'clear_app_data' tool. It uses ADB to clear the app data for the specified package name. The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool() def clear_app_data(package_name: str) -> str: """Clear app data for a specific app on the connected Android device""" result = subprocess.run( ["adb", "shell", "pm", "clear", package_name], capture_output=True, text=True ) if result.returncode != 0: raise RuntimeError(f"Error clearing app data for '{package_name}': {result.stderr}") return f"App data for '{package_name}' has been cleared."
  • The @mcp.tool() decorator registers the clear_app_data function as an MCP tool.
    @mcp.tool()

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/vs4vijay/espresso-mcp'

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