Skip to main content
Glama

install_app_device

Installs an app on a physical Apple device like iPhone, iPad, or Apple TV by specifying the device UDID and the .app bundle path. Part of the XcodeBuildMCP server.

Instructions

Installs an app on a physical Apple device (iPhone, iPad, Apple Watch, Apple TV, Apple Vision Pro). Requires deviceId and appPath.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appPathYesPath to the .app bundle to install (full path to the .app directory)
deviceIdYesUDID of the device (obtained from list_devices)

Implementation Reference

  • The main handler function that executes the app installation logic using 'xcrun devicectl device install app' command.
    export async function install_app_deviceLogic(
      params: InstallAppDeviceParams,
      executor: CommandExecutor,
    ): Promise<ToolResponse> {
      const { deviceId, appPath } = params;
    
      log('info', `Installing app on device ${deviceId}`);
    
      try {
        const result = await executor(
          ['xcrun', 'devicectl', 'device', 'install', 'app', '--device', deviceId, appPath],
          'Install app on device',
          true, // useShell
          undefined, // env
        );
    
        if (!result.success) {
          return {
            content: [
              {
                type: 'text',
                text: `Failed to install app: ${result.error}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            {
              type: 'text',
              text: `✅ App installed successfully on device ${deviceId}\n\n${result.output}`,
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        log('error', `Error installing app on device: ${errorMessage}`);
        return {
          content: [
            {
              type: 'text',
              text: `Failed to install app on device: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Zod schema defining the input parameters: deviceId (UDID) and appPath (.app bundle path).
    const installAppDeviceSchema = z.object({
      deviceId: z
        .string()
        .min(1, 'Device ID cannot be empty')
        .describe('UDID of the device (obtained from list_devices)'),
      appPath: z
        .string()
        .describe('Path to the .app bundle to install (full path to the .app directory)'),
    });
  • Tool registration exporting the MCP tool object with name, description, schema (deviceId omitted for session), and wrapped handler.
    export default {
      name: 'install_app_device',
      description: 'Installs an app on a connected device.',
      schema: installAppDeviceSchema.omit({ deviceId: true } as const).shape,
      handler: createSessionAwareTool<InstallAppDeviceParams>({
        internalSchema: installAppDeviceSchema as unknown as z.ZodType<InstallAppDeviceParams>,
        logicFunction: install_app_deviceLogic,
        getExecutor: getDefaultCommandExecutor,
        requirements: [{ allOf: ['deviceId'], message: 'deviceId is required' }],
      }),
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action is an installation but lacks details on permissions needed, whether it overwrites existing apps, error handling, or side effects. This is a mutation tool with significant behavioral gaps in disclosure.

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 two sentences, front-loaded with the core purpose, followed by parameter requirements. Every word contributes essential information with zero waste, making it highly efficient and well-structured.

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?

Given no annotations and no output schema, the description covers the basic purpose and parameters but lacks details on behavioral traits, error cases, or return values. For a mutation tool with 2 parameters, it is minimally adequate but leaves gaps in understanding full context.

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 fully documents parameters. The description adds minimal value by naming the parameters and hinting at 'list_devices' for deviceId, but does not provide additional semantics beyond the schema. With 0 parameters needing extra explanation, baseline 4 is appropriate.

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 ('Installs') and the target ('an app on a physical Apple device'), specifying the exact device types (iPhone, iPad, etc.). It distinguishes from sibling 'install_app_sim' by explicitly mentioning physical devices versus simulators.

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 by mentioning required parameters (deviceId and appPath) and referencing 'list_devices' for obtaining deviceId, but does not explicitly state when to use this tool versus alternatives like 'install_app_sim' or provide exclusions. Guidance is present but not comprehensive.

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

Related 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/getsentry/XcodeBuildMCP'

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