xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
56 lines • 4.1 kB
TypeScript
/**
* Clean build artifacts for Xcode projects with validation and structured output
*
* **What it does:**
* Removes build artifacts and intermediate files for an Xcode project or workspace. Pre-validates
* that the project exists and Xcode is properly installed before executing, providing clear error
* messages if something is misconfigured. Returns structured JSON responses with execution status,
* duration, and any errors encountered during the clean operation.
*
* **Why you'd use it:**
* - Resolve build issues by removing stale or corrupted build artifacts
* - Free up disk space occupied by intermediate build files
* - Ensure clean builds from scratch without cached compilation results
* - Get structured feedback with execution time and success status
*
* **Parameters:**
* - projectPath (string, required): Path to .xcodeproj or .xcworkspace file
* - scheme (string, required): Build scheme name to clean
* - configuration (string, optional): Build configuration to clean (e.g., "Debug", "Release")
*
* **Returns:**
* Structured JSON response containing success status, command executed, execution duration,
* output messages, and exit code. Includes both stdout and stderr for comprehensive debugging.
* Operation typically completes in under 3 minutes.
*
* **Example:**
* ```typescript
* // Clean default configuration
* const result = await xcodebuildCleanTool({
* projectPath: "/path/to/MyApp.xcodeproj",
* scheme: "MyApp"
* });
*
* // Clean specific configuration
* const cleanRelease = await xcodebuildCleanTool({
* projectPath: "/path/to/MyApp.xcworkspace",
* scheme: "MyApp",
* configuration: "Release"
* });
* ```
*
* **Full documentation:** See src/tools/xcodebuild/clean.md for detailed parameters
*
* @param args Tool arguments containing projectPath, scheme, and optional configuration
* @returns Tool result with clean operation status and execution details
*/
export declare function xcodebuildCleanTool(args: any): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const XCODEBUILD_CLEAN_DOCS = "\n# xcodebuild-clean\n\n\u26A1 **Clean build artifacts** with validation and structured output\n\n## What it does\n\nRemoves build artifacts and intermediate files for an Xcode project or workspace. Pre-validates that the project exists and Xcode is properly installed before executing, providing clear error messages if something is misconfigured. Returns structured JSON responses with execution status, duration, and any errors encountered during the clean operation.\n\n## Why you'd use it\n\n- Resolve build issues by removing stale or corrupted build artifacts\n- Free up disk space occupied by intermediate build files\n- Ensure clean builds from scratch without cached compilation results\n- Get structured feedback with execution time and success status\n\n## Parameters\n\n### Required\n- **projectPath** (string): Path to .xcodeproj or .xcworkspace file\n- **scheme** (string): Build scheme name to clean\n\n### Optional\n- **configuration** (string): Build configuration to clean (e.g., \"Debug\", \"Release\")\n\n## Returns\n\nStructured JSON response containing success status, command executed, execution duration, output messages, and exit code. Includes both stdout and stderr for comprehensive debugging. Operation typically completes in under 3 minutes.\n\n## Examples\n\n### Clean default configuration\n```typescript\nconst result = await xcodebuildCleanTool({\n projectPath: \"/path/to/MyApp.xcodeproj\",\n scheme: \"MyApp\"\n});\n```\n\n### Clean specific configuration\n```typescript\nconst cleanRelease = await xcodebuildCleanTool({\n projectPath: \"/path/to/MyApp.xcworkspace\",\n scheme: \"MyApp\",\n configuration: \"Release\"\n});\n```\n\n## Related Tools\n\n- xcodebuild-build: Build after cleaning\n- xcodebuild-list: Discover available schemes\n";
export declare const XCODEBUILD_CLEAN_DOCS_MINI = "Clean build artifacts. Use rtfm({ toolName: \"xcodebuild-clean\" }) for docs.";
//# sourceMappingURL=clean.d.ts.map