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],

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/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 clearly indicates this is a write/mutation operation ('Installs'), but doesn't describe what happens if installation fails, whether it overwrites existing apps, or what permissions are required. The IMPORTANT warning about required parameters is helpful but doesn't fully cover behavioral traits.

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 perfectly front-loaded with the core purpose first, followed by critical usage information and a concrete example. Every sentence serves a clear purpose with zero wasted words, making it highly efficient for an AI agent.

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

Completeness4/5

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

For a 2-parameter tool with 100% schema coverage but no annotations or output schema, the description provides adequate context. It covers the core purpose, parameter requirements, and includes a helpful example. However, as a mutation tool with no annotations, it could benefit from more behavioral context about failure modes or side effects.

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%, so the schema already fully documents both parameters. The description adds minimal value beyond the schema by emphasizing both parameters are required and providing a concrete example, but doesn't explain parameter semantics beyond what's already 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 'install_app_device' which targets physical devices. The purpose is unambiguous and differentiated from alternatives.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool (for iOS simulators) and references 'list_simulators' as a prerequisite for obtaining the simulatorUuid. However, it doesn't explicitly state when NOT to use it (e.g., vs. install_app_device for physical devices) or name specific alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.