Skip to main content
Glama

listApps

Retrieve a complete inventory of installed applications on Android or iOS devices for mobile testing and automation purposes.

Instructions

List all apps installed on the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesTarget platform

Implementation Reference

  • The handler function for the listApps tool. It creates a ListInstalledApps instance for the given device, executes it to get the list of installed apps, and returns a JSON response with the apps and a message.
    const listAppsHandler = async (device: BootedDevice) => { try { const listInstalledApps = new ListInstalledApps(device); const apps = await listInstalledApps.execute(); return createJSONToolResponse({ message: `Listed ${apps.length} apps`, apps }); } catch (error) { throw new ActionableError(`Failed to list apps: ${error}`); } };
  • Zod schema defining the input for listApps tool, which requires a 'platform' field as either 'android' or 'ios'.
    export const listAppsSchema = z.object({ platform: z.enum(["android", "ios"]).describe("Target platform") });
  • Registration of the listApps tool using ToolRegistry.registerDeviceAware, providing the tool name, description, schema, and handler function.
    ToolRegistry.registerDeviceAware( "listApps", "List all apps installed on the device", listAppsSchema, listAppsHandler );

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/zillow/auto-mobile'

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