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', },

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