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));
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. 'Uninstall' implies a destructive mutation, but it doesn't specify whether this requires special permissions, if the action is reversible, what happens to app data, or error conditions. For a mutation tool with zero annotation coverage, this is inadequate.

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?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

For a destructive mutation tool with no annotations and no output schema, the description is insufficient. It doesn't cover what happens on success/failure, return values, error conditions, or behavioral nuances. Given the complexity of device app management, more context is needed for safe and effective use.

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 the schema already documents both parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it doesn't explain package name format, device ID usage, or parameter interactions. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('uninstall') and resource ('app from the device'), making the purpose immediately understandable. It distinguishes from siblings like 'adb_install_app' by specifying the opposite operation. However, it doesn't explicitly mention the ADB context that siblings imply.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like having an app already installed, device connectivity, or when to choose this over other app management tools. The only implied usage is from the tool name's 'adb' prefix.

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

Install Server

Other Tools

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