Skip to main content
Glama
xcode-analyzer-mcp

xcode-analyzer-mcp

by sunny-maeng

analyze_build_time

Analyze Xcode build times from DerivedData logs to identify slow files and modules; fall back to static complexity analysis when build logs are unavailable.

Instructions

Analyze Xcode build times from DerivedData build logs. Shows slowest files and modules. Falls back to static complexity analysis if no build logs are found.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectPath": "<projectPath>"
    },
    "name": "analyze_build_time"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNNoNumber of top slow files to show (default: 20)
schemeNoXcode scheme name to match in DerivedData
projectPathYesPath to the Xcode project root directory
thresholdMsNoOnly show files taking longer than this (ms, default: 0)
derivedDataPathNoCustom DerivedData path (default: ~/Library/Developer/Xcode/DerivedData)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses a non-obvious behavioral trait: results silently come from a different method (static complexity) when build logs are absent, which matters for interpreting output. It does not say whether the tool is strictly read-only, how expensive a run is on a large DerivedData directory, or how the two result modes differ in shape.

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?

Three short sentences, front-loaded with the core action, then the outcome, then the fallback condition. Nothing is redundant and each sentence adds information an agent would otherwise have to guess.

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?

For a read-only analysis tool with five well-documented parameters and no output schema, the description covers purpose, source of data, and fallback behavior adequately. What is missing is how the fallback output differs from the log-derived output, which an agent would want since there is no output schema to inspect.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented, and the baseline is 3. The description adds only light context, implicitly tying 'slowest files' to topN and 'build logs' to derivedDataPath, but gives no extra meaning on scheme matching or how thresholdMs interacts with topN.

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?

States a specific verb and resource ('Analyze Xcode build times from DerivedData build logs') plus the concrete output ('slowest files and modules'). The fallback to static complexity analysis further pins down what the tool does, and none of the sibling tools (dependency tree, import graph, retain cycles) overlap with build-time profiling.

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 makes the use case clear: profile build performance to find slow files and modules. It also gives an edge-case rule (use static complexity analysis when no build logs exist), which is useful conditional guidance. It does not name a sibling alternative or state when not to use it, so it stops short of a 5.

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