Skip to main content
Glama

mobile_list_apps

Retrieve a list of all installed applications on a device using the Mobile Next MCP server, enabling efficient mobile automation and app management for iOS and Android platforms.

Instructions

List all the installed apps on the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noParamsYes

Implementation Reference

  • src/server.ts:211-222 (registration)
    Registration of the 'mobile_list_apps' tool, including input schema (empty), description, and handler function that invokes robot.listApps() and formats the result.
    tool( "mobile_list_apps", "List all the installed apps on the device", { noParams }, async ({}) => { requireRobot(); const result = await robot!.listApps(); return `Found these apps on device: ${result.map(app => `${app.appName} (${app.packageName})`).join(", ")}`; } );
  • The core handler logic for the mobile_list_apps tool, which requires a device/robot to be selected and lists installed apps by calling robot.listApps().
    async ({}) => { requireRobot(); const result = await robot!.listApps(); return `Found these apps on device: ${result.map(app => `${app.appName} (${app.packageName})`).join(", ")}`; }
  • Type definition (schema) for InstalledApp used in the output of listApps().
    export interface InstalledApp { packageName: string; appName: string; }
  • Android-specific implementation of listApps() using adb to query launcher activities.
    public async listApps(): Promise<InstalledApp[]> { // only apps that have a launcher activity are returned return this.adb("shell", "cmd", "package", "query-activities", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER") .toString() .split("\n") .map(line => line.trim()) .filter(line => line.startsWith("packageName=")) .map(line => line.substring("packageName=".length)) .filter((value, index, self) => self.indexOf(value) === index) .map(packageName => ({ packageName, appName: packageName, })); }
  • iOS-specific implementation of listApps() using go-ios library.
    public async listApps(): Promise<InstalledApp[]> { await this.assertTunnelRunning(); const output = await this.ios("apps", "--all", "--list"); return output .split("\n") .map(line => { const [packageName, appName] = line.split(" "); return { packageName, appName, }; }); }

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/EmpathySlainLovers/MCP'

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