Skip to main content
Glama

adb_uninstall_app

Remove apps from Android devices using ADB commands to manage device storage and performance by uninstalling specified applications.

Instructions

Uninstall an app from the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageNameYesPackage name of the app to uninstall
deviceIdNoDevice ID (optional)

Implementation Reference

  • The core handler function in AppTools class that performs the ADB uninstall operation by executing the 'adb uninstall' command, checks device connectivity, handles errors, and returns structured result.
    async uninstallApp(packageName: string, deviceId?: string) { try { const connected = await this.adbClient.isDeviceConnected(deviceId); if (!connected) { return { success: false, error: 'Device not connected', message: 'Cannot uninstall app - device is not connected' }; } const command = `uninstall ${packageName}`; const result = await this.adbClient.executeCommand(command, deviceId); if (!result.success || result.output.includes('Failure')) { return { success: false, error: result.error || result.output, message: 'Failed to uninstall app' }; } return { success: true, data: { packageName, deviceId: deviceId || this.adbClient.getDefaultDevice() }, message: `App ${packageName} uninstalled successfully` }; } catch (error: any) { return { success: false, error: error.message, message: 'Failed to uninstall app' }; } }
  • The input schema and metadata definition for the 'adb_uninstall_app' tool, registered in the ListTools response.
    name: 'adb_uninstall_app', description: 'Uninstall an app from the device', inputSchema: { type: 'object', properties: { packageName: { type: 'string', description: 'Package name of the app to uninstall', }, deviceId: { type: 'string', description: 'Device ID (optional)', }, }, required: ['packageName'], },
  • src/index.ts:455-456 (registration)
    The switch case in the CallToolRequest handler that registers and dispatches calls to the uninstallApp method in AppTools.
    case 'adb_uninstall_app': return await this.handleToolCall(this.appTools.uninstallApp(args?.packageName as string, args?.deviceId as string));

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/richard0913/adb-mcp'

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