Skip to main content
Glama

build_ios_dev_ws

Build iOS applications from Xcode workspaces for physical device deployment by specifying workspace path and scheme parameters.

Instructions

Builds an iOS app from a workspace for a physical device. IMPORTANT: Requires workspacePath and scheme. Example: build_ios_dev_ws({ workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyScheme' })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspacePathYesPath to the .xcworkspace file (Required)
schemeYesThe scheme to use (Required)
configurationNoBuild configuration (Debug, Release, etc.)
derivedDataPathNoPath where build products and other derived data will go
extraArgsNoAdditional xcodebuild arguments
preferXcodebuildNoIf true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails.

Implementation Reference

  • The handler function for the 'build_ios_dev_ws' tool. It validates the required 'workspacePath' and 'scheme' parameters and then invokes executeXcodeBuildCommand to perform the iOS device build from a workspace.
    async (params: Params) => {
      const workspaceValidation = validateRequiredParam('workspacePath', params.workspacePath);
      if (!workspaceValidation.isValid) return workspaceValidation.errorResponse!;
    
      const schemeValidation = validateRequiredParam('scheme', params.scheme);
      if (!schemeValidation.isValid) return schemeValidation.errorResponse!;
    
      return executeXcodeBuildCommand(
        {
          ...params,
          configuration: params.configuration ?? 'Debug', // Default config
        },
        {
          platform: XcodePlatform.iOS,
          logPrefix: 'iOS Device Build',
        },
        params.preferXcodebuild,
        'build',
      );
    },
  • The input schema object defining parameters for the 'build_ios_dev_ws' tool, composed of shared schemas from common.js.
    {
      workspacePath: workspacePathSchema,
      scheme: schemeSchema,
      configuration: configurationSchema,
      derivedDataPath: derivedDataPathSchema,
      extraArgs: extraArgsSchema,
      preferXcodebuild: preferXcodebuildSchema,
    },
  • The registration function specific to 'build_ios_dev_ws' tool, using registerTool to add it to the MCP server with name, description, schema, and handler.
    export function registerIOSDeviceBuildWorkspaceTool(server: McpServer): void {
      type Params = BaseWorkspaceParams;
      registerTool<Params>(
        server,
        'build_ios_dev_ws',
        "Builds an iOS app from a workspace for a physical device. IMPORTANT: Requires workspacePath and scheme. Example: build_ios_dev_ws({ workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyScheme' })",
        {
          workspacePath: workspacePathSchema,
          scheme: schemeSchema,
          configuration: configurationSchema,
          derivedDataPath: derivedDataPathSchema,
          extraArgs: extraArgsSchema,
          preferXcodebuild: preferXcodebuildSchema,
        },
        async (params: Params) => {
          const workspaceValidation = validateRequiredParam('workspacePath', params.workspacePath);
          if (!workspaceValidation.isValid) return workspaceValidation.errorResponse!;
    
          const schemeValidation = validateRequiredParam('scheme', params.scheme);
          if (!schemeValidation.isValid) return schemeValidation.errorResponse!;
    
          return executeXcodeBuildCommand(
            {
              ...params,
              configuration: params.configuration ?? 'Debug', // Default config
            },
            {
              platform: XcodePlatform.iOS,
              logPrefix: 'iOS Device Build',
            },
            params.preferXcodebuild,
            'build',
          );
        },
      );
    }
  • Group registration function that registers both workspace and project variants for iOS device builds, including 'build_ios_dev_ws'.
    export function registerIOSDeviceBuildTools(server: McpServer): void {
      registerIOSDeviceBuildWorkspaceTool(server);
      registerIOSDeviceBuildProjectTool(server);
    }
  • Top-level tool registry entry that conditionally registers the iOS device build tools group (including 'build_ios_dev_ws') based on environment variable.
    {
      register: registerIOSDeviceBuildTools,
      groups: [ToolGroup.IOS_DEVICE_WORKFLOW],
      envVar: 'XCODEBUILDMCP_TOOL_IOS_DEVICE_BUILD_TOOLS',
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool performs a build operation (implies mutation/write) and mentions required parameters, but doesn't describe what the build actually does (compiles code, creates .app file), where output goes, whether it's destructive to existing builds, authentication needs, or performance characteristics. For a build tool with zero annotation coverage, this is insufficient behavioral context.

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 in the first sentence, followed by critical requirement information and a concrete example. Every sentence earns its place - the first states what it does, the second states requirements, and the third provides syntactic guidance. No wasted words or redundant information.

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 6 parameters, no annotations, and no output schema, the description is adequate but has clear gaps. It covers the basic purpose and requirements well, but doesn't explain what the build produces, where artifacts go, error conditions, or performance expectations. The lack of output schema means the description should ideally mention what gets returned, but it doesn't.

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 6 parameters thoroughly. The description adds minimal value beyond the schema by emphasizing that workspacePath and scheme are required and providing a usage example, but doesn't explain parameter interactions, default behaviors, or semantic meaning beyond what's 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 ('Builds an iOS app'), target resource ('from a workspace'), and deployment target ('for a physical device'), which distinguishes it from sibling tools like 'build_ios_sim_id_ws' (simulator builds) and 'build_ios_dev_proj' (project-based builds). 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 Guidelines4/5

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

The description explicitly states when to use this tool ('for a physical device') and provides required parameters (workspacePath and scheme), but doesn't explicitly mention when NOT to use it or name specific alternatives. The context implies it's for workspace-based iOS device builds, but lacks explicit exclusion guidance for simulator or project-based alternatives.

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