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
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Target platform |
Implementation Reference
- src/server/observeTools.ts:32-44 (handler)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}`); } };
- src/server/observeTools.ts:14-16 (schema)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") });
- src/server/observeTools.ts:54-59 (registration)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 );