Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

List Xcode Schemes & Targets

xcodebuild-list
Read-onlyIdempotent

List Xcode project targets, schemes, and configurations with caching to prevent repeated expensive discovery and input validation for clear errors.

Instructions

xcodebuild-list

⚡ List project targets, schemes, and configurations with intelligent caching

What it does

Discovers and returns all available build targets, schemes, and configurations for an Xcode project or workspace. Uses 1-hour intelligent caching to remember results and avoid expensive re-runs of project discovery. Validates both Xcode installation and project path before execution to provide clear error messages if something is misconfigured.

Why you'd use it

  • Discover available schemes before building or testing (essential for automation)

  • Validate project structure and configuration

  • Get structured project metadata for CI/CD pipelines

  • Avoid expensive repeated queries with 1-hour caching

Parameters

Required

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

Optional

  • outputFormat (string, default: 'json'): "json" or "text" output format

Returns

Structured JSON containing all targets, schemes, configurations, and project information. Consistent format across .xcodeproj and .xcworkspace project types. Results are cached for 1 hour to speed up subsequent queries.

Examples

List schemes for a project

const info = await xcodebuildListTool({
  projectPath: "/path/to/MyApp.xcodeproj"
});

List with text output

const textInfo = await xcodebuildListTool({
  projectPath: "/path/to/MyApp.xcworkspace",
  outputFormat: "text"
});
  • xcodebuild-build: Build discovered schemes

  • xcodebuild-test: Test discovered schemes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYes
outputFormatNojson

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / outputFormat / description
      Removed value: -"Output format preference"
    • removedInput schema / properties / projectPath / description
      Removed value: -"Path to .xcodeproj or .xcworkspace file"
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds value beyond those: it mentions 1-hour caching, validation of Xcode installation and project path, and consistent output across project types. These details give an agent expectations about side effects and runtime behavior without contradicting the annotations.

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 Markdown structure uses clear sections ('What it does', 'Why you'd use it', 'Parameters', 'Returns', 'Examples', 'Related Tools') that are easy to scan. It is longer than minimal but each section contributes meaningful information. Minor stylistic elements (⚡, bold) add noise but do not hinder comprehension.

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?

The description covers prerequisites (project path), validations, output format, caching, and provides a high-level return overview. Since no output schema exists, the 'Returns' section summarizes the structured JSON content. It could detail exact return fields more, but for a simple list tool this current coverage is sufficient and matches the complexity.

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

Parameters5/5

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

Since the input schema has 0% description coverage, the tool description carries the full parameter burden. It explains projectPath as the path to .xcodeproj or .xcworkspace, and details outputFormat as either 'json' or 'text' with a default of 'json'. The examples clarify usage, making both parameters unambiguous.

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 explicitly states the tool lists project targets, schemes, and configurations with a specific verb ('List') and resource type. It also distinguishes itself from related build and test tools by referencing them in the 'Related Tools' section and by the described behavior of discovery and validation.

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?

The 'Why you'd use it' section provides clear use cases (discover schemes before building, validate structure, CI/CD metadata) and mentions its value of caching to reduce repeated queries. However, it does not explicitly contrast against alternatives like xcodebuild-get-details or xcodebuild-showsdks, so the guidance is strong but not fully exclusionary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.