Skip to main content
Glama

adb_install_app

Install APK files on Android devices using Android Debug Bridge commands to deploy applications for testing or management.

Instructions

Install an APK file on the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apkPathYesPath to the APK file
deviceIdNoDevice ID (optional)

Implementation Reference

  • The installApp method in the AppTools class that implements the core logic for installing an APK using adb install command, including device connection check and result parsing.
    async installApp(apkPath: string, deviceId?: string) {
      try {
        const connected = await this.adbClient.isDeviceConnected(deviceId);
        if (!connected) {
          return {
            success: false,
            error: 'Device not connected',
            message: 'Cannot install app - device is not connected'
          };
        }
    
        const command = `install "${apkPath}"`;
        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 install app'
          };
        }
    
        return {
          success: true,
          data: { apkPath, deviceId: deviceId || this.adbClient.getDefaultDevice() },
          message: `App installed successfully from ${apkPath}`
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message,
          message: 'Failed to install app'
        };
      }
    }
  • The input schema definition for the adb_install_app tool, specifying parameters apkPath (required) and deviceId (optional).
    {
      name: 'adb_install_app',
      description: 'Install an APK file on the device',
      inputSchema: {
        type: 'object',
        properties: {
          apkPath: {
            type: 'string',
            description: 'Path to the APK file',
          },
          deviceId: {
            type: 'string',
            description: 'Device ID (optional)',
          },
        },
        required: ['apkPath'],
      },
    },
  • src/index.ts:453-454 (registration)
    The switch case registration in the CallToolRequest handler that routes calls to adb_install_app to the AppTools.installApp method.
    case 'adb_install_app':
      return await this.handleToolCall(this.appTools.installApp(args?.apkPath 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 the full burden of behavioral disclosure. It states the action ('Install') but fails to mention critical details like required permissions, potential side effects (e.g., overwriting existing apps), error conditions, or output format. This leaves significant gaps for a mutation tool.

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, direct sentence with zero wasted words. It is appropriately sized and front-loaded, efficiently conveying the core purpose 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?

Given the tool's complexity (a mutation operation with no annotations and no output schema), the description is insufficient. It lacks details on behavioral traits, error handling, or return values, leaving the agent with incomplete information 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 input schema fully documents both parameters ('apkPath' and 'deviceId'). The description adds no additional meaning beyond what the schema provides, such as APK file requirements or device selection logic, meeting the baseline for high coverage.

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 action ('Install') and resource ('an APK file on the device'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'adb_push_file' or 'adb_uninstall_app', which prevents a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives like 'adb_push_file' for file transfer or 'adb_start_app' for launching. The description lacks context about prerequisites (e.g., device connectivity) or exclusions, offering minimal usage direction.

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