Skip to main content
Glama
zillow
by zillow

installPlatformDependencies

Install required dependencies and tools for Android or iOS platforms in the AutoMobile MCP server to enable mobile automation testing.

Instructions

Install required dependencies and tools for the specified platform

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesTarget platform to install dependencies for
updateNoUpdate behavior: force=always update, ifAvailable=update if detected but don't fail, never=don't updateifAvailable

Implementation Reference

  • Main handler function for the 'installPlatformDependencies' tool. Dispatches to platform-specific installation functions based on the platform argument.
    const installPlatformDependenciesHandler = async (
      args: InstallPlatformDependenciesArgs,
      progress?: ProgressCallback
    ) => {
      try {
        if (args.platform === "android") {
          return await installAndroidDependencies(args, progress);
        } else if (args.platform === "ios") {
          return await installIOSDependencies(args, progress);
        } else {
          throw new ActionableError(`Unsupported platform: ${args.platform}`);
        }
      } catch (error) {
        throw new ActionableError(`Failed to install ${args.platform} dependencies: ${error}`);
      }
    };
  • Zod schema defining the input parameters for the tool: platform (android/ios) and optional update strategy.
    export const installPlatformDependenciesSchema = z.object({
      platform: z.enum(["android", "ios"]).describe("Target platform to install dependencies for"),
      update: z.enum(["force", "ifAvailable", "never"]).optional().default("ifAvailable").describe("Update behavior: force=always update, ifAvailable=update if detected but don't fail, never=don't update")
    });
  • Registration of the tool with ToolRegistry, including name, description, schema, handler, and progress support flag.
    ToolRegistry.register(
      "installPlatformDependencies",
      "Install required dependencies and tools for the specified platform",
      installPlatformDependenciesSchema,
      installPlatformDependenciesHandler,
      true // Supports progress notifications
    );
  • Core helper function implementing Android platform dependency installation, including setup, optional updates, progress reporting, and result formatting.
    async function installAndroidDependencies(
      args: InstallPlatformDependenciesArgs,
      progress?: ProgressCallback
    ): Promise<any> {
      logger.info(`Installing Android dependencies with update: ${args.update}`);
    
      if (progress) {
        await progress(10, 100, "Starting Android dependency installation...");
      }
    
      // Determine if we should force installation based on update parameter
      let shouldForce = false;
      if (args.update === "force") {
        shouldForce = true;
      } else if (args.update === "never") {
        shouldForce = false;
      }
      // For "ifAvailable", we'll handle updates separately
    
      // Always use comprehensive setup - AutoMobile is opinionated about providing complete environment
      const setupParams: CompleteSetupParams = {
        installJava: true,
        installXcodeTools: true,
        force: shouldForce
      };
    
      if (progress) {
        await progress(30, 100, "Setting up complete Android development environment...");
      }
    
      const result = await setupCompleteAndroidEnvironment(setupParams);
    
      // Handle updates if requested and installation was successful but not forced
      let updateResult = null;
      if (args.update === "ifAvailable" && result.success && !shouldForce) {
        if (progress) {
          await progress(60, 100, "Checking for available updates...");
        }
    
        try {
          // Attempt to update by forcing a reinstall
          const updateParams: CompleteSetupParams = {
            installJava: true,
            installXcodeTools: true,
            force: true
          };
          updateResult = await setupCompleteAndroidEnvironment(updateParams);
          logger.info(`Update attempt completed: ${updateResult.success ? "successful" : "failed"}`);
        } catch (error) {
          logger.warn(`Update attempt failed but continuing: ${error}`);
          // Don't fail the overall operation for update failures when using "ifAvailable"
        }
      }
    
      if (progress) {
        await progress(100, 100, "Complete Android environment setup finished");
      }
    
      return createJSONToolResponse({
        success: result.success,
        message: result.success ? "Complete Android development environment installed" : "Some components failed to install",
        platform: "android",
        updateMode: args.update,
        steps: result.steps,
        environmentVariables: result.environmentVariables,
        recommendations: result.recommendations,
        updateAttempted: args.update === "ifAvailable" && updateResult !== null,
        updateSuccessful: updateResult?.success || false
      });
    }
  • TypeScript interface defining the argument shape for type safety, matching the schema.
    export interface InstallPlatformDependenciesArgs {
      platform: SomePlatform;
      update?: "force" | "ifAvailable" | "never";
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('install') but doesn't describe what this entails—whether it modifies system state, requires specific permissions, has side effects, or provides feedback on success/failure. For a tool that likely performs system modifications, this is a significant gap in transparency.

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?

The description is a single, efficient sentence that front-loads the core action and scope without any wasted words. It's appropriately sized for a tool with two parameters and clear purpose, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely performs system installations. It doesn't explain what 'install' entails behaviorally, what dependencies are installed, how success is indicated, or potential errors. For a tool with potential side effects, more context is needed.

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?

Schema description coverage is 100%, with both parameters ('platform' and 'update') well-documented in the schema. The description adds no additional parameter semantics beyond implying the platform parameter's existence ('for the specified platform'). This meets the baseline for high schema coverage but doesn't enhance understanding.

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

Purpose4/5

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

The description clearly states the verb ('install') and resource ('dependencies and tools') with specific scope ('for the specified platform'), making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like 'checkPlatformDependencies', but the action is distinct enough to infer differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'checkPlatformDependencies' or other setup-related tools. There's no mention of prerequisites, typical scenarios, or exclusions, leaving the agent to guess based on the tool name alone.

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

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