Skip to main content
Glama

install_app_sim

Install iOS applications into specific simulators by providing the simulator UUID and app bundle path for testing and development purposes.

Instructions

Installs an app in an iOS simulator. IMPORTANT: You MUST provide both the simulatorUuid and appPath parameters. Example: install_app_sim({ simulatorUuid: 'YOUR_UUID_HERE', appPath: '/path/to/your/app.app' })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
simulatorUuidYesUUID of the simulator to use (obtained from list_simulators)
appPathYesPath to the .app bundle to install (full path to the .app directory)

Implementation Reference

  • Executes the tool logic: validates simulatorUuid and appPath, checks if app file exists, runs 'xcrun simctl install', extracts bundle ID if possible, and returns success message with next steps.
        async (params): Promise<ToolResponse> => {
          const simulatorUuidValidation = validateRequiredParam('simulatorUuid', params.simulatorUuid);
          if (!simulatorUuidValidation.isValid) {
            return simulatorUuidValidation.errorResponse!;
          }
    
          const appPathValidation = validateRequiredParam('appPath', params.appPath);
          if (!appPathValidation.isValid) {
            return appPathValidation.errorResponse!;
          }
    
          const appPathExistsValidation = validateFileExists(params.appPath);
          if (!appPathExistsValidation.isValid) {
            return appPathExistsValidation.errorResponse!;
          }
    
          log('info', `Starting xcrun simctl install request for simulator ${params.simulatorUuid}`);
    
          try {
            const command = ['xcrun', 'simctl', 'install', params.simulatorUuid, params.appPath];
            const result = await executeCommand(command, 'Install App in Simulator');
    
            if (!result.success) {
              return {
                content: [
                  {
                    type: 'text',
                    text: `Install app in simulator operation failed: ${result.error}`,
                  },
                ],
              };
            }
    
            let bundleId = '';
            try {
              bundleId = execSync(`defaults read "${params.appPath}/Info" CFBundleIdentifier`)
                .toString()
                .trim();
            } catch (error) {
              log('warning', `Could not extract bundle ID from app: ${error}`);
            }
    
            return {
              content: [
                {
                  type: 'text',
                  text: `App installed successfully in simulator ${params.simulatorUuid}`,
                },
                {
                  type: 'text',
                  text: `Next Steps:
    1. Open the Simulator app: open_sim({ enabled: true })
    2. Launch the app: launch_app_sim({ simulatorUuid: "${params.simulatorUuid}"${bundleId ? `, bundleId: "${bundleId}"` : ', bundleId: "YOUR_APP_BUNDLE_ID"'} })`,
                },
              ],
            };
          } catch (error) {
            const errorMessage = error instanceof Error ? error.message : String(error);
            log('error', `Error during install app in simulator operation: ${errorMessage}`);
            return {
              content: [
                {
                  type: 'text',
                  text: `Install app in simulator operation failed: ${errorMessage}`,
                },
              ],
            };
          }
        },
  • Input schema using Zod: requires simulatorUuid (string) and appPath (string).
    {
      simulatorUuid: z
        .string()
        .describe('UUID of the simulator to use (obtained from list_simulators)'),
      appPath: z
        .string()
        .describe('Path to the .app bundle to install (full path to the .app directory)'),
    },
  • Registers the 'install_app_sim' tool on the MCP server with name, description, input schema, and handler function.
      server.tool(
        'install_app_sim',
        "Installs an app in an iOS simulator. IMPORTANT: You MUST provide both the simulatorUuid and appPath parameters. Example: install_app_sim({ simulatorUuid: 'YOUR_UUID_HERE', appPath: '/path/to/your/app.app' })",
        {
          simulatorUuid: z
            .string()
            .describe('UUID of the simulator to use (obtained from list_simulators)'),
          appPath: z
            .string()
            .describe('Path to the .app bundle to install (full path to the .app directory)'),
        },
        async (params): Promise<ToolResponse> => {
          const simulatorUuidValidation = validateRequiredParam('simulatorUuid', params.simulatorUuid);
          if (!simulatorUuidValidation.isValid) {
            return simulatorUuidValidation.errorResponse!;
          }
    
          const appPathValidation = validateRequiredParam('appPath', params.appPath);
          if (!appPathValidation.isValid) {
            return appPathValidation.errorResponse!;
          }
    
          const appPathExistsValidation = validateFileExists(params.appPath);
          if (!appPathExistsValidation.isValid) {
            return appPathExistsValidation.errorResponse!;
          }
    
          log('info', `Starting xcrun simctl install request for simulator ${params.simulatorUuid}`);
    
          try {
            const command = ['xcrun', 'simctl', 'install', params.simulatorUuid, params.appPath];
            const result = await executeCommand(command, 'Install App in Simulator');
    
            if (!result.success) {
              return {
                content: [
                  {
                    type: 'text',
                    text: `Install app in simulator operation failed: ${result.error}`,
                  },
                ],
              };
            }
    
            let bundleId = '';
            try {
              bundleId = execSync(`defaults read "${params.appPath}/Info" CFBundleIdentifier`)
                .toString()
                .trim();
            } catch (error) {
              log('warning', `Could not extract bundle ID from app: ${error}`);
            }
    
            return {
              content: [
                {
                  type: 'text',
                  text: `App installed successfully in simulator ${params.simulatorUuid}`,
                },
                {
                  type: 'text',
                  text: `Next Steps:
    1. Open the Simulator app: open_sim({ enabled: true })
    2. Launch the app: launch_app_sim({ simulatorUuid: "${params.simulatorUuid}"${bundleId ? `, bundleId: "${bundleId}"` : ', bundleId: "YOUR_APP_BUNDLE_ID"'} })`,
                },
              ],
            };
          } catch (error) {
            const errorMessage = error instanceof Error ? error.message : String(error);
            log('error', `Error during install app in simulator operation: ${errorMessage}`);
            return {
              content: [
                {
                  type: 'text',
                  text: `Install app in simulator operation failed: ${errorMessage}`,
                },
              ],
            };
          }
        },
      );
    }
  • Includes the registerInstallAppInSimulatorTool in the toolRegistrations array, which is used to conditionally register tools based on environment variables.
    register: registerInstallAppInSimulatorTool,
    groups: [ToolGroup.APP_DEPLOYMENT, ToolGroup.IOS_SIMULATOR_WORKFLOW],
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it clearly indicates this is a write/mutation operation ('Installs'), it doesn't describe what happens on failure, whether the operation is idempotent, permission requirements, or side effects. The 'IMPORTANT' warning about required parameters is procedural rather than behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: a clear purpose statement followed by a specific usage example. The 'IMPORTANT' warning is front-loaded for emphasis. While efficient, the example could be slightly more concise by omitting the placeholder values in the justification.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description provides adequate basic information about what the tool does and parameter requirements. However, it lacks information about return values, error conditions, or what constitutes successful installation - gaps that become more significant given the absence of structured output documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds minimal value beyond the schema by emphasizing that both parameters are mandatory and providing a concrete example format, but doesn't explain parameter relationships or constraints beyond what's in the schema descriptions.

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

Purpose5/5

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

The description clearly states the specific action ('Installs an app') and target resource ('in an iOS simulator'), distinguishing it from sibling tools like 'launch_app_sim' or 'boot_sim'. It provides a complete verb+resource+context combination that leaves no ambiguity about the tool's function.

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

Usage Guidelines3/5

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

The description implies usage context through the example (installing apps on simulators) but doesn't explicitly state when to use this tool versus alternatives like 'launch_app_sim' or 'build_ios_sim_id_proj'. It provides mandatory parameter requirements but no comparative guidance about tool selection scenarios.

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/SampsonKY/XcodeBuildMCP'

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