Skip to main content
Glama

list_apps

Retrieve a list of installed applications on an Android device, with options to filter system apps and specify target devices.

Instructions

List installed applications on the Android device. By default shows third-party apps only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_systemNoInclude system apps in the list
device_idNoDevice serial number

Implementation Reference

  • The handler function `listApps` that executes the ADB commands to list applications.
    export async function listApps(deviceId?: string, includeSystem: boolean = false): Promise<AppInfo[]> {
      const resolved = await deviceManager.resolveDeviceId(deviceId);
    
      const flag = includeSystem ? '' : '-3'; // -3 = third-party only
      const args = flag ? ['pm', 'list', 'packages', flag] : ['pm', 'list', 'packages'];
      const result = await adbShell(args, resolved);
    
      const apps: AppInfo[] = result.stdout
        .split('\n')
        .filter(line => line.startsWith('package:'))
        .map(line => ({
          packageName: line.replace('package:', '').trim(),
        }));
    
      log.info(`Listed ${apps.length} apps`, { deviceId: resolved, includeSystem });
      return apps;
    }
  • Tool registration for 'list_apps' within the MCP server.
    export function registerAppTools(server: McpServer): void {
      server.registerTool(
        'list_apps',
        {
          description: 'List installed applications on the Android device. By default shows third-party apps only.',
          inputSchema: {
            include_system: z.boolean().optional().default(false).describe('Include system apps in the list'),
            device_id: z.string().optional().describe('Device serial number'),
          },
        },
        async ({ include_system, device_id }) => {
          return await metrics.measure('list_apps', device_id || 'default', async () => {
            const apps = await listApps(device_id, include_system);
            return {
              content: [{
                type: 'text' as const,
                text: JSON.stringify({ success: true, count: apps.length, apps }, null, 2),
              }],
            };
          });
        }
      );
Behavior3/5

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

No annotations provided, so description carries full burden. It successfully discloses the default filtering behavior (third-party vs system), but omits output format details, pagination behavior, or permission requirements that would help predict the response structure.

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?

Two sentences with zero waste. First sentence declares purpose; second sentence declares default behavior. Every word earns its place and critical information is front-loaded.

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

Completeness4/5

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

Appropriate for a simple 2-parameter listing tool with full schema coverage. Covers core functionality and filtering logic. Minor deduction for lacking any hint about return value structure (package names, versions, etc.) given no output schema exists.

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?

Input schema has 100% description coverage (device_id and include_system both documented), establishing baseline 3. The description adds context that 'third-party apps' are shown by default, reinforcing the include_system=false semantics, but doesn't elaborate on device_id format or validation rules.

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

Purpose5/5

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

Specific verb 'List' + resource 'installed applications' + context 'Android device'. The default behavior 'third-party apps only' clearly distinguishes it from generic app queries and siblings like get_current_app (single app) or install_apk (modification).

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

Usage Guidelines3/5

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

Provides implied usage guidance by stating the default filter (third-party only), hinting when to use include_system=true. However, lacks explicit when-not-to-use guidance or named alternatives (e.g., doesn't clarify to use get_current_app for foreground app details).

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/divineDev-dotcom/android_mcp'

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