Skip to main content
Glama

adb_list_apps

List installed applications on an Android device to manage apps or troubleshoot issues. Use this tool to retrieve app packages and names from connected devices.

Instructions

List installed apps on the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoDevice ID (optional)

Implementation Reference

  • The handler function `listInstalledApps` that lists installed third-party apps using `adb shell pm list packages -3`, parses the output, and returns a structured response.
    async listInstalledApps(deviceId?: string) {
      try {
        const connected = await this.adbClient.isDeviceConnected(deviceId);
        if (!connected) {
          return {
            success: false,
            error: 'Device not connected',
            message: 'Cannot list apps - device is not connected'
          };
        }
    
        const command = 'shell pm list packages -3';
        const result = await this.adbClient.executeCommand(command, deviceId);
        
        if (!result.success) {
          return {
            success: false,
            error: result.error,
            message: 'Failed to list installed apps'
          };
        }
    
        const packages = result.output
          .split('\n')
          .map(line => line.replace('package:', '').trim())
          .filter(line => line.length > 0);
    
        return {
          success: true,
          data: { 
            packages,
            count: packages.length,
            deviceId: deviceId || this.adbClient.getDefaultDevice()
          },
          message: `Found ${packages.length} installed apps`
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message,
          message: 'Failed to list installed apps'
        };
      }
    }
  • Tool schema definition in the ListTools response, specifying name, description, and optional deviceId input.
    {
      name: 'adb_list_apps',
      description: 'List installed apps on the device',
      inputSchema: {
        type: 'object',
        properties: {
          deviceId: {
            type: 'string',
            description: 'Device ID (optional)',
          },
        },
        required: [],
      },
    },
  • src/index.ts:461-462 (registration)
    Registration and dispatch in the CallToolRequest switch statement, mapping the tool name to the AppTools.listInstalledApps handler.
    case 'adb_list_apps':
      return await this.handleToolCall(this.appTools.listInstalledApps(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 it's a list operation, implying read-only behavior, but doesn't cover aspects like permissions needed, output format, pagination, or error handling. This is insufficient for a tool with potential device interactions.

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 zero wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, app details included), error conditions, or dependencies like needing a connected device. For a tool in a device management context, this leaves significant gaps.

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?

The schema description coverage is 100%, with the single parameter 'deviceId' documented as optional. The description doesn't add any meaning beyond this, such as explaining default behavior if omitted or how device IDs are obtained. Baseline 3 is appropriate given the 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 ('List') and resource ('installed apps on the device'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'adb_list_devices' or 'adb_list_files', which would require a 5.

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. For example, it doesn't mention if this is for getting a quick overview versus detailed app info, or how it relates to tools like 'adb_get_device_info'. This lack of context leaves usage unclear.

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