Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

workflow-fresh-install

Build, install, and launch an app on a fresh simulator with one call. Automates simulator shutdown, optional data wipe, boot, build, install, and launch for a clean installation cycle.

Instructions

workflow-fresh-install

Clean slate app installation - build, install, and launch with fresh simulator state.

Overview

Orchestrates a complete clean installation cycle in a single call:

  1. Select Simulator - Auto-detect or use specified device

  2. Shutdown - Ensure simulator is stopped

  3. Erase (optional) - Wipe all simulator data

  4. Boot - Start fresh simulator

  5. Build - Compile the Xcode project

  6. Install - Install the built app

  7. Launch - Start the app

This workflow keeps intermediate results internal, reducing agent context usage by ~70% compared to calling each tool manually.

Parameters

Required

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

  • scheme (string): Build scheme name

Optional

  • simulatorUdid (string): Target simulator - auto-detected if omitted

  • eraseSimulator (boolean): Wipe simulator data before install (default: false)

  • configuration ("Debug" | "Release"): Build configuration (default: Debug)

  • launchArguments (string[]): App launch arguments

  • environmentVariables (Record<string, string>): App environment variables

Returns

Consolidated result with:

  • success: Overall workflow success

  • project: Build configuration details

  • simulator: Target simulator info

  • app: Installed app details (bundleId, path, launched)

  • totalDuration: Total workflow time

  • guidance: Next steps

Examples

Basic Fresh Install

{
  "projectPath": "/path/to/MyApp.xcodeproj",
  "scheme": "MyApp"
}

Auto-selects simulator, builds, installs, and launches.

Clean Install with Erased Simulator

{
  "projectPath": "/path/to/MyApp.xcworkspace",
  "scheme": "MyApp",
  "eraseSimulator": true,
  "configuration": "Debug"
}

Erases all simulator data for truly fresh state.

Specific Simulator with Launch Arguments

{
  "projectPath": "/path/to/MyApp.xcodeproj",
  "scheme": "MyApp",
  "simulatorUdid": "ABC123-DEF456",
  "launchArguments": ["-UITesting", "-ResetState"],
  "environmentVariables": {"DEBUG_MODE": "1"}
}

Targets specific simulator with custom launch configuration.

Why Use This Workflow?

Token Efficiency

  • Manual approach: 6-7 tool calls × ~100 tokens each = ~600+ tokens in responses

  • Workflow approach: 1 call with consolidated response = ~150 tokens

Reduced Context Pollution

  • Build logs not exposed (only success/failure)

  • Intermediate states summarized

  • Only actionable outcome returned

Consistent State

  • Shutdown ensures clean starting point

  • Optional erase for truly fresh state

  • Proper boot sequencing

  • workflow-tap-element: UI interaction after install

  • xcodebuild-build: Direct build (used internally)

  • simctl-device: Direct simulator control (used internally)

  • simctl-app: Direct app management (used internally)

Notes

  • Shutdown failures are non-fatal (simulator may already be off)

  • Auto-suggests best simulator based on project requirements

  • Build artifacts are located automatically

  • Bundle ID is discovered from build settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to .xcodeproj or .xcworkspace
schemeYesBuild scheme name
simulatorUdidNoTarget simulator
eraseSimulatorNoWipe simulator data
configurationNoDebug
launchArgumentsNo
environmentVariablesNo
Behavior5/5

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

With no annotations, the description fully bears transparency burden. It details the 7-step orchestration, side effects (shutdown, optional erase, boot), and behaviors like handling shutdown failures as non-fatal. It also mentions that intermediate results are internal, which goes beyond basic operational description.

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?

The description is well-structured with overview, parameters, return values, examples, and rationale. It is somewhat long but each section serves a purpose. Minor redundancy exists (e.g., repeating step sequence in overview and later), but overall it is efficiently organized.

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

Completeness5/5

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

Given 7 parameters, no output schema, and moderate schema coverage, the description compensates fully. It describes the return object structure, provides three examples covering different scenarios, and explains the workflow's advantages. This makes the tool understandable and actionable without relying on external schema details.

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 description coverage is 57% (4/7 parameters described). The description adds meaning via examples and parameter details (e.g., auto-detection for simulatorUdid, default values like false for eraseSimulator). It provides context beyond schema, though not all parameters get equal depth.

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 it performs a 'clean slate app installation' with a specific process sequence, and distinguishes itself from siblings like workflow-tap-element (UI interaction) and xcodebuild-build (direct build) via the 'Related Tools' section.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The 'Why Use This Workflow?' section explicitly compares token efficiency and context reduction vs manual calls, and 'Related Tools' lists alternatives for different tasks (e.g., UI interaction after install). This provides clear when-to-use and when-not-to-use guidance.

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