Skip to main content
Glama

adb_start_app

Start Android applications on connected devices by specifying package names, enabling automated app launching for testing and management workflows.

Instructions

Start an app on the device

Input Schema

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

Implementation Reference

  • The startApp method in AppTools class implements the core logic for the adb_start_app tool. It checks device connectivity, constructs the appropriate ADB shell command (am start or monkey), executes it via AdbClient, and returns success/error details.
    async startApp(packageName: string, activityName?: string, deviceId?: string) {
      try {
        const connected = await this.adbClient.isDeviceConnected(deviceId);
        if (!connected) {
          return {
            success: false,
            error: 'Device not connected',
            message: 'Cannot start app - device is not connected'
          };
        }
    
        let command: string;
        if (activityName) {
          command = `shell am start -n ${packageName}/${activityName}`;
        } else {
          command = `shell monkey -p ${packageName} -c android.intent.category.LAUNCHER 1`;
        }
    
        const result = await this.adbClient.executeCommand(command, deviceId);
        
        if (!result.success) {
          return {
            success: false,
            error: result.error,
            message: 'Failed to start app'
          };
        }
    
        return {
          success: true,
          data: { 
            packageName, 
            activityName,
            deviceId: deviceId || this.adbClient.getDefaultDevice()
          },
          message: `App ${packageName} started successfully`
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message,
          message: 'Failed to start app'
        };
      }
    }
  • Input schema definition for the adb_start_app tool in the ListTools response, defining parameters: packageName (required), activityName and deviceId (optional).
    name: 'adb_start_app',
    description: 'Start an app on the device',
    inputSchema: {
      type: 'object',
      properties: {
        packageName: {
          type: 'string',
          description: 'Package name of the app to start',
        },
        activityName: {
          type: 'string',
          description: 'Activity name (optional)',
        },
        deviceId: {
          type: 'string',
          description: 'Device ID (optional)',
        },
      },
      required: ['packageName'],
    },
  • src/index.ts:457-458 (registration)
    Registration and dispatch in the CallToolRequest handler switch statement, mapping 'adb_start_app' calls to this.appTools.startApp method.
    case 'adb_start_app':
      return await this.handleToolCall(this.appTools.startApp(args?.packageName as string, args?.activityName as string, args?.deviceId as string));
  • src/index.ts:39-39 (registration)
    Instantiation of AppTools class instance used for app-related tools including startApp.
    this.appTools = new AppTools(this.adbClient);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Start an app' implies a state-changing operation, but it doesn't describe what 'start' entails (e.g., launches main activity, brings to foreground), potential side effects, error conditions, or required permissions. This leaves significant gaps for an agent to understand the tool's behavior.

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, clear sentence with no wasted words. It's front-loaded with the core action and target, making it immediately understandable 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 tool that performs a state-changing operation (starting apps) with no annotations and no output schema, the description is insufficient. It doesn't explain what happens on success/failure, return values, or how it interacts with device state. Given the complexity of app launching and the lack of structured metadata, more context is needed.

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%, with all parameters clearly documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline of 3 for adequate coverage without adding value.

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 ('Start') and target ('an app on the device'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'adb_install_app' or 'adb_stop_app', but the verb 'Start' is specific enough to distinguish it from most other ADB operations.

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 (e.g., device connectivity), when not to use it, or how it differs from similar tools like 'adb_shell' for launching apps or 'adb_install_app' for installation.

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