Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Xcode Version Info

xcodebuild-version
Read-onlyIdempotent

Retrieves Xcode and SDK version details as structured JSON to validate build environments and check SDK availability. Use it to ensure consistent versions across CI/CD.

Instructions

xcodebuild-version

⚡ Get Xcode and SDK version information with structured output

What it does

Retrieves comprehensive version information about your Xcode installation and available SDKs. Returns structured JSON data that's easy to parse and validate, eliminating the need to parse raw command-line output. Validates Xcode installation before execution to provide clear error messages if Xcode is not properly configured.

Why you'd use it

  • Validate environment before running builds or tests (CI/CD validation)

  • Check SDK availability for specific platform versions

  • Ensure consistent Xcode versions across team or build environments

  • Get structured version data for automated tooling and scripts

Parameters

Optional

  • sdk (string): Query specific SDK version (e.g., "iphoneos", "iphonesimulator")

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

Returns

Structured JSON response containing Xcode version, build number, and SDK information. Falls back gracefully to text format for older Xcode versions that don't support JSON output.

Examples

Get Xcode version as JSON

const result = await xcodebuildVersionTool({ outputFormat: "json" });

Query specific SDK

const sdkInfo = await xcodebuildVersionTool({ sdk: "iphoneos" });
  • xcodebuild-showsdks: Show all available SDKs

  • xcodebuild-list: List project information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sdkNo
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 / sdk / description
      Removed value: -"Specific SDK to query (optional)"
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds non-obvious behaviors: it validates the Xcode installation before executing and provides clear error messages, and it falls back gracefully to text output for older Xcode versions that don't support JSON. These details go beyond the annotations and help an agent predict side effects and return variability.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear headers, a parameter section, examples, and related tools, and the core action is front-loaded in the first line. However, it is verbose: 'Why you'd use it' overlaps with 'What it does', and some marketing-style bullets could be trimmed. It is organized but not particularly concise.

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?

For a tool with no output schema, the description explains returns at useful granularity: structured JSON containing Xcode version, build number, and SDK info, with fallback to text. It also covers prerequisites indirectly by mentioning validation, provides examples, and lists related tools. An agent has all needed information to call this tool correctly.

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?

The input schema only provides types and an enum with no property descriptions (coverage 0%). The description's Parameters section explains exactly what each parameter does: sdk queries a specific SDK version with examples ('iphoneos', 'iphonesimulator'), and outputFormat specifies json/text with the default. Examples further demonstrate usage, fully compensating for the schema.

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 opens with a specific action and resource: 'Get Xcode and SDK version information'. The 'What it does' section expands with 'Retrieves comprehensive version information about your Xcode installation and available SDKs'. The Related Tools section names siblings such as xcodebuild-showsdks and xcodebuild-list with one-line descriptions, so an agent can clearly distinguish this version-info tool from listing/project tools.

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 concrete contexts: environment validation before builds/tests, checking SDK availability, ensuring consistent versions, and needing structured data for automation. Related Tools list alternatives such as xcodebuild-showsdks and xcodebuild-list, allowing an agent to see nearby options. However, it never explicitly states when NOT to use this tool in favor of a named sibling.

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