Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

xcodebuild-clean

Remove build artifacts and intermediate files for Xcode projects. Validates project existence and Xcode installation before executing, then returns structured JSON with execution status and duration.

Instructions

xcodebuild-clean

Clean build artifacts 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

Required

  • projectPath (string): Path to .xcodeproj or .xcworkspace file

  • scheme (string): Build scheme name to clean

Optional

  • configuration (string): 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.

Examples

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"
});
  • xcodebuild-build: Build after cleaning

  • xcodebuild-list: Discover available schemes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYes
schemeYes
configurationNo
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses pre-validation of project existence and Xcode installation, structured JSON output with success status, duration, errors, and typical execution time under 3 minutes. No contradictions.

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?

Well-structured with sections, emoji, and examples. Front-loaded with header and purpose. Slightly verbose (e.g., repeated 'structured JSON response') but clear and organized.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and 3 parameters, description covers purpose, parameters, output type, examples, pre-validation, and execution time. Lacks detailed output field list but sufficient for a clean operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but description adds meaning: projectPath is path to .xcodeproj or .xcworkspace, scheme is build scheme name, configuration is optional with examples (Debug, Release). Examples illustrate usage. Not all parameters are fully detailed (e.g., configuration values), but sufficient.

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 tool removes build artifacts and intermediate files for Xcode projects. It distinguishes itself from siblings like xcodebuild-build (for building after cleaning) and xcodebuild-list (for discovering schemes), making its purpose unique and specific.

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?

Provides 'Why you'd use it' with concrete scenarios (resolve build issues, free up disk space, ensure clean builds). References related tools but does not explicitly state when not to use this tool (e.g., if you need to build instead of clean).

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/conorluddy/xc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server