Skip to main content
Glama

build_ios_sim_name_ws

Build an iOS app from a workspace for a specific simulator by name. Requires workspace path, scheme, and simulator name to compile and run iOS applications in designated simulators.

Instructions

Builds an iOS app from a workspace for a specific simulator by name. IMPORTANT: Requires workspacePath, scheme, and simulatorName. Example: build_ios_sim_name_ws({ workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyScheme', simulatorName: 'iPhone 16' })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspacePathYesPath to the .xcworkspace 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 that executes the iOS simulator build using xcodebuild, called by the tool's registration handler.
    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',
      );
    }
  • Registration function that defines and registers the 'build_ios_sim_name_ws' tool with MCP server, including input schema, description, and thin handler wrapper.
    export function registerIOSSimulatorBuildByNameWorkspaceTool(server: McpServer): void {
      type Params = {
        workspacePath: string;
        scheme: string;
        simulatorName: string;
        configuration?: string;
        derivedDataPath?: string;
        extraArgs?: string[];
        useLatestOS?: boolean;
        preferXcodebuild?: boolean;
      };
    
      registerTool<Params>(
        server,
        'build_ios_sim_name_ws',
        "Builds an iOS app from a workspace for a specific simulator by name. IMPORTANT: Requires workspacePath, scheme, and simulatorName. Example: build_ios_sim_name_ws({ workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyScheme', simulatorName: 'iPhone 16' })",
        {
          workspacePath: workspacePathSchema,
          scheme: schemeSchema,
          simulatorName: simulatorNameSchema,
          configuration: configurationSchema,
          derivedDataPath: derivedDataPathSchema,
          extraArgs: extraArgsSchema,
          useLatestOS: useLatestOSSchema,
          preferXcodebuild: preferXcodebuildSchema,
        },
        async (params: Params) => {
          // Validate required parameters
          const workspaceValidation = validateRequiredParam('workspacePath', params.workspacePath);
          if (!workspaceValidation.isValid) return workspaceValidation.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,
          });
        },
      );
    }
  • Zod schemas for common tool parameters, used in the input schema for 'build_ios_sim_name_ws'.
    export const workspacePathSchema = z.string().describe('Path to the .xcworkspace file (Required)');
    export const projectPathSchema = z.string().describe('Path to the .xcodeproj file (Required)');
    export const schemeSchema = z.string().describe('The scheme to use (Required)');
    export const configurationSchema = z
      .string()
      .optional()
      .describe('Build configuration (Debug, Release, etc.)');
    export const derivedDataPathSchema = z
      .string()
      .optional()
      .describe('Path where build products and other derived data will go');
    export const extraArgsSchema = z
      .array(z.string())
      .optional()
      .describe('Additional xcodebuild arguments');
    export const simulatorNameSchema = z
      .string()
      .describe("Name of the simulator to use (e.g., 'iPhone 16') (Required)");
    export const simulatorIdSchema = z
      .string()
      .describe('UUID of the simulator to use (obtained from listSimulators) (Required)');
    export const useLatestOSSchema = z
      .boolean()
      .optional()
      .describe('Whether to use the latest OS version for the named simulator');
    export const appPathSchema = z
      .string()
      .describe('Path to the .app bundle (full path to the .app directory)');
    export const bundleIdSchema = z
      .string()
      .describe("Bundle identifier of the app (e.g., 'com.example.MyApp')");
    export const launchArgsSchema = z
      .array(z.string())
      .optional()
      .describe('Additional arguments to pass to the app');
    export const preferXcodebuildSchema = z
      .boolean()
      .optional()
      .describe(
        'If true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails.',
      );
  • Invocation of the tool registration function in the central tool registration array.
      register: registerIOSSimulatorBuildByNameWorkspaceTool,
      groups: [ToolGroup.IOS_SIMULATOR_WORKFLOW],
      envVar: 'XCODEBUILDMCP_TOOL_IOS_SIMULATOR_BUILD_BY_NAME_WORKSPACE',
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what parameters are required. It doesn't disclose behavioral traits like whether this is a read-only or destructive operation, what happens on failure, expected runtime, or output format. The 'IMPORTANT' note about required parameters is helpful but insufficient for behavioral understanding.

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 helpful example. The front-loaded purpose statement earns its place, though the example could be slightly more concise. No wasted words or redundancy.

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

Completeness2/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, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, what happens during execution, error conditions, or how it differs behaviorally from similar build tools. The example helps but doesn't compensate for missing behavioral context.

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 highlighting the 3 required parameters in the example, but doesn't provide additional semantic context beyond what's in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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'), resource ('iOS app'), and context ('from a workspace for a specific simulator by name'). It distinguishes from siblings like build_ios_sim_name_proj (which uses project instead of workspace) and build_ios_sim_id_ws (which uses simulator ID instead of name).

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 (building iOS apps for simulators from workspaces) but doesn't explicitly state when to choose this tool over alternatives like build_ios_sim_name_proj or build_ios_dev_ws. The example helps but doesn't provide comparative guidance.

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