Skip to main content
Glama
drewster99

xcode-mcp-server (drewster99)

by drewster99

build_project

Destructive

Build an Xcode project or workspace, returning errors and warnings with optional timeout and regex filtering.

Instructions

Build the specified Xcode project or workspace.

Builds run for up to `timeout` seconds (default 600, i.e. 10 minutes) before
timing out, which guards against a build that hangs indefinitely. Raise it
for large projects whose cold build exceeds the default.

Args:
    project_path: Path to an Xcode project or workspace directory.
    scheme: Name of the scheme to build. If not provided, uses the active scheme.
    include_warnings: Include warnings in build output. If not provided, uses global setting.
    regex_filter: Optional regex to filter error/warning lines
    max_lines: Maximum number of error/warning lines to show (default 25)
    timeout: Maximum seconds to wait for the build to complete. If not
        provided, defaults to 600. Must be a positive integer.

Returns:
    Always returns JSON with format:
    {
        "full_log_path": "~/Library/Caches/xcode-mcp-server/logs/build-{hash}.txt",
        "summary": {"total_errors": N, "total_warnings": M, "showing_errors": X, "showing_warnings": Y},
        "errors_and_warnings": "Build failed with N errors...

error: ... ..." } The errors_and_warnings field contains a summary message followed by the actual errors/warnings. Errors are prioritized over warnings - errors are shown first, then warnings fill remaining slots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
schemeNo
include_warningsNo
regex_filterNo
max_linesNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description aligns with the destructiveHint=true annotation, explaining that builds are potentially destructive. It discloses timeout behavior, default values, and the structure of the return value, including how errors and warnings are prioritized. No contradictions with annotations.

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

Conciseness5/5

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

The description is concise and well-structured, with a clear opening sentence, bullet points for arguments, and a detailed return format. Every sentence adds value without redundancy.

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?

While the description covers the tool's operation, inputs, and output well, it omits environmental prerequisites (e.g., Xcode must be installed) and does not explicitly state that the tool is safe to run multiple times. However, given the complexity, it is nearly complete.

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?

Despite 0% schema coverage, the description comprehensively explains each parameter beyond the schema types. For instance, it states that 'scheme' defaults to the active scheme, 'include_warnings' uses global setting, 'timeout' must be a positive integer with a default of 600 seconds. This adds significant meaning.

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's purpose: 'Build the specified Xcode project or workspace.' The verb 'build' is specific and directly contrasts with sibling tools like 'clean_project' or 'get_build_errors'. It leaves no ambiguity about the tool's core function.

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

Usage Guidelines3/5

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

The description provides context such as the timeout default and adjustment for large projects, but it does not explicitly guide when to use this tool versus alternatives. For example, it doesn't mention that 'get_build_results' might be used after a build to fetch results, nor does it state when 'clean_project' should be used instead. The guidance is present but incomplete.

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/drewster99/xcode-mcp-server'

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