checkPlatformDependencies
Verify installation status of required dependencies and tools for mobile platforms to ensure proper setup before automation tasks.
Instructions
Check the installation status of platform dependencies and tools
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Target platform to check dependencies for |
Implementation Reference
- src/server/environmentTools.ts:53-65 (handler)The main handler function for the checkPlatformDependencies tool, dispatching to platform-specific check functions based on the input platform.const checkPlatformDependenciesHandler = async (args: CheckPlatformDependenciesArgs) => { try { if (args.platform === "android") { return await checkAndroidDependencies(); } else if (args.platform === "ios") { return await checkIOSDependencies(); } else { throw new ActionableError(`Unsupported platform: ${args.platform}`); } } catch (error) { throw new ActionableError(`Failed to check ${args.platform} dependencies: ${error}`); } };
- src/server/environmentTools.ts:19-21 (schema)Zod schema defining the input parameters for the checkPlatformDependencies tool (platform: android or ios).export const checkPlatformDependenciesSchema = z.object({ platform: z.enum(["android", "ios"]).describe("Target platform to check dependencies for") });
- src/server/environmentTools.ts:76-81 (registration)Registration of the checkPlatformDependencies tool in the ToolRegistry, including name, description, schema, and handler.ToolRegistry.register( "checkPlatformDependencies", "Check the installation status of platform dependencies and tools", checkPlatformDependenciesSchema, checkPlatformDependenciesHandler );
- Helper function that implements the actual Android dependency checking logic called by the main handler.async function checkAndroidDependencies(): Promise<any> { logger.info("Checking Android dependencies status"); const status = await getInstallationStatus(); const javaStatus = await checkJavaInstallation(); return createJSONToolResponse({ platform: "android", hasInstallation: status.hasInstallation, locations: status.locations, bestLocation: status.bestLocation, recommendations: status.recommendations, availableTools: status.bestLocation?.available_tools || [], installationPath: status.bestLocation?.path || null, installationSource: status.bestLocation?.source || null, version: status.bestLocation?.version || null, java: { installed: javaStatus.installed, version: javaStatus.version, javaHome: javaStatus.javaHome } }); }
- Helper function providing a stub implementation for iOS dependency checking.async function checkIOSDependencies(): Promise<any> { logger.info("Checking iOS dependencies status (stub)"); return createJSONToolResponse({ platform: "ios", hasInstallation: false, message: "iOS dependency checking is not yet implemented", recommendations: [ "iOS support is planned for a future release", "Manually verify Xcode is installed", "Check that iOS Simulator is available" ] }); }