Skip to main content
Glama
xcode-analyzer-mcp

xcode-analyzer-mcp

by sunny-maeng

analyze_import_graph

Build a module dependency graph from Swift import statements to reveal fan-in/fan-out and output adjacency lists, matrices, Mermaid diagrams, or DOT/Graphviz files.

Instructions

Build a module dependency graph from Swift import statements. Shows fan-in/fan-out statistics and can output as adjacency list, matrix, Mermaid diagram, or DOT/Graphviz format.

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_import_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectPathYesPath to the Xcode project root directory
outputFormatNoOutput format (default: adjacency_list)
excludePatternsNoGlob patterns to exclude
includeSystemFrameworksNoInclude system frameworks like UIKit, Foundation (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does disclose the returned content (fan-in/fan-out statistics) and the set of renderable formats, which is real value, but it never states whether output is returned inline versus written to disk, whether analysis is read-only, or how it behaves on large projects.

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?

Two tight sentences, front-loaded with the core verb and resource, then the output capabilities. No filler or restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With full schema coverage and no output schema, the main missing pieces are routing guidance against sibling analysis tools and how the graph is delivered (text response vs. file). Adequate but not complete for a tool that overlaps heavily with its siblings.

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 all four parameters are already documented, and the baseline of 3 applies. The description adds only modest meaning by spelling out that 'mermaid' and 'dot' are diagram/Graphviz renderings, but says nothing about excludePatterns or includeSystemFrameworks semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific action and resource: builds a module dependency graph from Swift import statements, and adds what it produces (fan-in/fan-out stats, four output formats). That is clearly distinct from graph-adjacent siblings like analyze_dependency_tree or analyze_circular_dependencies, though it never names them explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no reference to any alternative tool. An agent must infer from the sibling names whether this or analyze_dependency_tree is the right choice for a given question.

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