Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

xcodebuild-list

List Xcode project targets, schemes, and configurations with intelligent caching to avoid repeated discovery. Validates setup, returns structured data for automation.

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
Behavior4/5

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

With no annotations, the description provides good behavioral context: it mentions 1-hour caching, validates Xcode installation and project path before execution, and gives clear error messages. It does not discuss any side effects or permissions.

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 clear sections (What it does, Why you'd use it, Parameters, Returns, Examples, Related Tools). It uses markdown headings, code blocks, and bullet points. While a bit lengthy, every part adds value.

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?

The description explains return type (structured JSON), caching behavior, validation checks, and provides examples. For a read-only listing tool without an output schema, it covers all necessary information for an agent to use it correctly.

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 0%, but the description adds meaningful parameter details: projectPath is a path to .xcodeproj or .xcworkspace, outputFormat defaults to 'json' with enum values 'json' and 'text'. Examples reinforce usage. Minor lack: no explanation of text output format.

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 lists project targets, schemes, and configurations for Xcode projects. It distinguishes from siblings like xcodebuild-build and xcodebuild-test by focusing on discovery and metadata retrieval.

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 description includes a 'Why you'd use it' section listing concrete use cases and mentions related tools for context. However, it does not explicitly state when not to use the tool or provide exclusion criteria.

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