Skip to main content
Glama

install_app

Install an app bundle (.app or .ipa) on the iOS Simulator by specifying the app path and optionally the simulator's UDID.

Instructions

Installs an app bundle (.app or .ipa) on the iOS Simulator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNoUdid of target, can also be set with the IDB_UDID env var
app_pathYesPath to the app bundle (.app directory or .ipa file) to install

Implementation Reference

  • The handler function for the install_app tool. Resolves the UDID (booted device), checks app bundle existence, runs `xcrun simctl install`, and returns success/error.
      async ({ udid, app_path }) => {
        try {
          const actualUdid = await getBootedDeviceId(udid);
          const absolutePath = path.isAbsolute(app_path)
            ? app_path
            : path.resolve(app_path);
    
          // Check if the app bundle exists
          if (!fs.existsSync(absolutePath)) {
            throw new Error(`App bundle not found at: ${absolutePath}`);
          }
    
          // run() will throw if the command fails (non-zero exit code)
          await run("xcrun", ["simctl", "install", actualUdid, absolutePath]);
    
          return {
            isError: false,
            content: [
              {
                type: "text",
                text: `App installed successfully from: ${absolutePath}`,
              },
            ],
          };
        } catch (error) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: errorWithTroubleshooting(
                  `Error installing app: ${toError(error).message}`
                ),
              },
            ],
          };
        }
      }
    );
  • Schema definition for install_app: takes optional udid (matching UDID_REGEX) and required app_path (max 1024 chars).
    "Installs an app bundle (.app or .ipa) on the iOS Simulator",
    {
      udid: z
        .string()
        .regex(UDID_REGEX)
        .optional()
        .describe("Udid of target, can also be set with the IDB_UDID env var"),
      app_path: z
        .string()
        .max(1024)
        .describe(
          "Path to the app bundle (.app directory or .ipa file) to install"
        ),
    },
    { title: "Install App", readOnlyHint: false, openWorldHint: true },
  • src/index.ts:1100-1157 (registration)
    Registration of the install_app tool using server.tool() with a filter check.
    if (!isToolFiltered("install_app")) {
      server.tool(
        "install_app",
        "Installs an app bundle (.app or .ipa) on the iOS Simulator",
        {
          udid: z
            .string()
            .regex(UDID_REGEX)
            .optional()
            .describe("Udid of target, can also be set with the IDB_UDID env var"),
          app_path: z
            .string()
            .max(1024)
            .describe(
              "Path to the app bundle (.app directory or .ipa file) to install"
            ),
        },
        { title: "Install App", readOnlyHint: false, openWorldHint: true },
        async ({ udid, app_path }) => {
          try {
            const actualUdid = await getBootedDeviceId(udid);
            const absolutePath = path.isAbsolute(app_path)
              ? app_path
              : path.resolve(app_path);
    
            // Check if the app bundle exists
            if (!fs.existsSync(absolutePath)) {
              throw new Error(`App bundle not found at: ${absolutePath}`);
            }
    
            // run() will throw if the command fails (non-zero exit code)
            await run("xcrun", ["simctl", "install", actualUdid, absolutePath]);
    
            return {
              isError: false,
              content: [
                {
                  type: "text",
                  text: `App installed successfully from: ${absolutePath}`,
                },
              ],
            };
          } catch (error) {
            return {
              isError: true,
              content: [
                {
                  type: "text",
                  text: errorWithTroubleshooting(
                    `Error installing app: ${toError(error).message}`
                  ),
                },
              ],
            };
          }
        }
      );
    }
  • getBootedDeviceId helper - resolves the UDID by either using the provided one or finding the currently booted simulator.
    async function getBootedDeviceId(
      deviceId: string | undefined
    ): Promise<string> {
      // If deviceId not provided, get the currently booted simulator
      let actualDeviceId = deviceId;
      if (!actualDeviceId) {
        const { id } = await getBootedDevice();
        actualDeviceId = id;
      }
      if (!actualDeviceId) {
        throw new Error("No booted simulator found and no deviceId provided");
      }
      return actualDeviceId;
    }
  • errorWithTroubleshooting helper - appends troubleshooting link to error messages.
    function errorWithTroubleshooting(message: string): string {
      return `${message}\n\nFor help, see the ${troubleshootingLink()}`;
    }
Behavior3/5

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

Annotations already indicate readOnlyHint=false and openWorldHint=true. The description adds no behavioral context beyond what annotations provide (e.g., mutation, no side effects mentioned).

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?

Single sentence, directly states purpose with no unnecessary words. Front-loaded and efficient.

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?

Adequate for a simple install tool with two parameters. However, it lacks any information about return values, success/failure indicators, or post-install steps, which would help an agent assess completeness.

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 documents both parameters. The description adds minimal extra (e.g., file formats for app_path) but does not significantly enhance understanding beyond the schema.

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 action (install) and resource (app bundle on iOS Simulator). It distinguishes from sibling tools like launch_app by focusing on installation only.

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?

No guidance on when to use this tool versus alternatives or any prerequisites. It does not mention that installation is typically followed by launch_app.

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/joshuayoes/ios-simulator-mcp'

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