xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
61 lines • 5.18 kB
TypeScript
/**
* Build Xcode projects with intelligent defaults and performance tracking
*
* **What it does:**
* Builds Xcode projects and workspaces with advanced learning capabilities that remember
* successful configurations and suggest optimal simulators per project. Uses progressive
* disclosure to provide concise summaries by default, with full build logs available on demand.
* Tracks build performance metrics (duration, errors, warnings) and learns from successful
* builds to improve future build suggestions.
*
* **Why you'd use it:**
* - Automatic smart defaults: remembers which simulator and config worked last time
* - Progressive disclosure: concise summaries prevent token overflow, full logs on demand
* - Performance tracking: measures build times and provides optimization insights
* - Structured errors: clear error messages instead of raw CLI stderr
*
* **Parameters:**
* - projectPath (string, required): Path to .xcodeproj or .xcworkspace file
* - scheme (string, required): Build scheme name (use xcodebuild-list to discover)
* - configuration (string, optional): Build configuration (Debug/Release, defaults to cached or "Debug")
* - destination (string, optional): Build destination (e.g., "platform=iOS Simulator,id=<UDID>")
* - sdk (string, optional): SDK to build against (e.g., "iphonesimulator", "iphoneos")
* - derivedDataPath (string, optional): Custom derived data path for build artifacts
*
* **Returns:**
* Structured JSON response with buildId (for progressive disclosure), success status, build
* summary (errors, warnings, duration), and intelligence metadata showing which smart defaults
* were applied. Use xcodebuild-get-details with buildId to retrieve full logs.
*
* **Example:**
* ```typescript
* // Minimal build with smart defaults
* const result = await xcodebuildBuildTool({
* projectPath: "/path/to/MyApp.xcodeproj",
* scheme: "MyApp"
* });
*
* // Explicit configuration
* const release = await xcodebuildBuildTool({
* projectPath: "/path/to/MyApp.xcworkspace",
* scheme: "MyApp",
* configuration: "Release",
* destination: "platform=iOS Simulator,id=ABC-123"
* });
* ```
*
* **Full documentation:** See src/tools/xcodebuild/build.md for detailed parameters
*
* @param args Tool arguments containing projectPath, scheme, and optional build configuration
* @returns Tool result with build summary and buildId for progressive disclosure
*/
export declare function xcodebuildBuildTool(args: any): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const XCODEBUILD_BUILD_DOCS = "\n# xcodebuild-build\n\n\u26A1 **Build Xcode projects** with intelligent defaults and performance tracking\n\n## What it does\n\nBuilds Xcode projects and workspaces with advanced learning capabilities that remember successful configurations and suggest optimal simulators per project. Uses progressive disclosure to provide concise summaries by default, with full build logs available on demand. Tracks build performance metrics (duration, errors, warnings) and learns from successful builds to improve future build suggestions.\n\n## Why you'd use it\n\n- Automatic smart defaults: remembers which simulator and config worked last time\n- Progressive disclosure: concise summaries prevent token overflow, full logs on demand\n- Performance tracking: measures build times and provides optimization insights\n- Structured errors: clear error messages instead of raw CLI stderr\n\n## Parameters\n\n### Required\n- **projectPath** (string): Path to .xcodeproj or .xcworkspace file\n- **scheme** (string): Build scheme name (use xcodebuild-list to discover)\n\n### Optional\n- **configuration** (string, default: 'Debug'): Build configuration (Debug/Release, defaults to cached or \"Debug\")\n- **destination** (string): Build destination (e.g., \"platform=iOS Simulator,id=<UDID>\")\n- **sdk** (string): SDK to build against (e.g., \"iphonesimulator\", \"iphoneos\")\n- **derivedDataPath** (string): Custom derived data path for build artifacts\n\n## Returns\n\nStructured JSON response with buildId (for progressive disclosure), success status, build summary (errors, warnings, duration), and intelligence metadata showing which smart defaults were applied. Use xcodebuild-get-details with buildId to retrieve full logs.\n\n## Examples\n\n### Minimal build with smart defaults\n```typescript\nconst result = await xcodebuildBuildTool({\n projectPath: \"/path/to/MyApp.xcodeproj\",\n scheme: \"MyApp\"\n});\n```\n\n### Explicit configuration\n```typescript\nconst release = await xcodebuildBuildTool({\n projectPath: \"/path/to/MyApp.xcworkspace\",\n scheme: \"MyApp\",\n configuration: \"Release\",\n destination: \"platform=iOS Simulator,id=ABC-123\"\n});\n```\n\n## Related Tools\n\n- xcodebuild-test: Run tests after building\n- xcodebuild-clean: Clean build artifacts\n- xcodebuild-get-details: Get full build logs (use with buildId)\n";
export declare const XCODEBUILD_BUILD_DOCS_MINI = "Build Xcode projects with smart defaults. Use rtfm({ toolName: \"xcodebuild-build\" }) for docs.";
//# sourceMappingURL=build.d.ts.map