Skip to main content
Glama

build_ios_sim_name_proj

Builds an iOS app from a project file for a specific simulator by name. Requires project path, scheme, and simulator name parameters.

Instructions

Builds an iOS app from a project file for a specific simulator by name. IMPORTANT: Requires projectPath, scheme, and simulatorName. Example: build_ios_sim_name_proj({ projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyScheme', simulatorName: 'iPhone 16' })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the .xcodeproj file (Required)
schemeYesThe scheme to use (Required)
simulatorNameYesName of the simulator to use (e.g., 'iPhone 16') (Required)
configurationNoBuild configuration (Debug, Release, etc.)
derivedDataPathNoPath where build products and other derived data will go
extraArgsNoAdditional xcodebuild arguments
useLatestOSNoWhether to use the latest OS version for the named simulator
preferXcodebuildNoIf true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails.

Implementation Reference

  • Core handler function implementing the build logic for iOS simulator apps from project files. Validates parameters and executes the xcodebuild build command with simulator targeting.
    /**
     * Internal logic for building iOS Simulator apps.
     */
    async function _handleIOSSimulatorBuildLogic(params: {
      workspacePath?: string;
      projectPath?: string;
      scheme: string;
      configuration: string;
      simulatorName?: string;
      simulatorId?: string;
      useLatestOS: boolean;
      derivedDataPath?: string;
      extraArgs?: string[];
      preferXcodebuild?: boolean;
    }): Promise<ToolResponse> {
      log('info', `Starting iOS Simulator build for scheme ${params.scheme} (internal)`);
    
      return executeXcodeBuildCommand(
        {
          ...params,
        },
        {
          platform: XcodePlatform.iOSSimulator,
          simulatorName: params.simulatorName,
          simulatorId: params.simulatorId,
          useLatestOS: params.useLatestOS,
          logPrefix: 'iOS Simulator Build',
        },
        params.preferXcodebuild,
        'build',
      );
    }
  • Zod schema defining input parameters for the build_ios_sim_name_proj tool, using shared common schemas.
    {
      projectPath: projectPathSchema,
      scheme: schemeSchema,
      simulatorName: simulatorNameSchema,
      configuration: configurationSchema,
      derivedDataPath: derivedDataPathSchema,
      extraArgs: extraArgsSchema,
      useLatestOS: useLatestOSSchema,
      preferXcodebuild: preferXcodebuildSchema,
    },
  • Tool registration call that defines the name, description, schema, and handler for 'build_ios_sim_name_proj' using the registerTool utility.
    registerTool<Params>(
      server,
      'build_ios_sim_name_proj',
      "Builds an iOS app from a project file for a specific simulator by name. IMPORTANT: Requires projectPath, scheme, and simulatorName. Example: build_ios_sim_name_proj({ projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyScheme', simulatorName: 'iPhone 16' })",
      {
        projectPath: projectPathSchema,
        scheme: schemeSchema,
        simulatorName: simulatorNameSchema,
        configuration: configurationSchema,
        derivedDataPath: derivedDataPathSchema,
        extraArgs: extraArgsSchema,
        useLatestOS: useLatestOSSchema,
        preferXcodebuild: preferXcodebuildSchema,
      },
      async (params: Params) => {
        // Validate required parameters
        const projectValidation = validateRequiredParam('projectPath', params.projectPath);
        if (!projectValidation.isValid) return projectValidation.errorResponse!;
    
        const schemeValidation = validateRequiredParam('scheme', params.scheme);
        if (!schemeValidation.isValid) return schemeValidation.errorResponse!;
    
        const simulatorNameValidation = validateRequiredParam('simulatorName', params.simulatorName);
        if (!simulatorNameValidation.isValid) return simulatorNameValidation.errorResponse!;
    
        // Provide defaults
        return _handleIOSSimulatorBuildLogic({
          ...params,
          configuration: params.configuration ?? 'Debug',
          useLatestOS: params.useLatestOS ?? true,
          preferXcodebuild: params.preferXcodebuild ?? false,
        });
      },
    );
  • Top-level registration entry that invokes the module-specific registration function during server tool setup, conditionally based on environment variable.
    {
      register: registerIOSSimulatorBuildByNameProjectTool,
      groups: [ToolGroup.IOS_SIMULATOR_WORKFLOW],
      envVar: 'XCODEBUILDMCP_TOOL_IOS_SIMULATOR_BUILD_BY_NAME_PROJECT',
    },
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 tool 'Builds an iOS app' but doesn't clarify whether this is a read-only operation, what happens on failure, whether it modifies the project, or what the output looks like. For a build tool with potential side effects, this lack of behavioral context is a significant gap.

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 efficiently structured with the core purpose first, followed by important requirements and a clear example. Both sentences earn their place by providing essential information without redundancy. It could be slightly more concise by integrating the example more seamlessly, but overall it's well-organized.

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 build tool with 8 parameters and no annotations or output schema, the description provides adequate basic information about what the tool does and required parameters. However, it lacks critical context about behavioral characteristics (side effects, failure modes) and doesn't help differentiate it from similar sibling tools, leaving gaps in overall 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 all 8 parameters thoroughly. The description adds minimal value by explicitly naming the three required parameters in the example, but doesn't provide additional context about parameter interactions or usage beyond what's in the schema. This meets the baseline for high schema coverage.

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 ('Builds an iOS app'), resource ('from a project file'), and target ('for a specific simulator by name'), which distinguishes it from siblings like build_ios_dev_proj (device builds) and build_ios_sim_id_proj (simulator by ID). The verb+resource+target combination is precise and unambiguous.

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 build_ios_sim_name_ws (workspace-based) or build_run_ios_sim_name_proj (build-and-run). It mentions required parameters but doesn't explain the tool's role in the broader workflow or prerequisites beyond those parameters.

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