analyze_circular_dependencies
Detect circular dependencies in Xcode projects by analyzing Swift imports and Package.swift targets to expose module, file, or type-level cycles before they disrupt builds.
Instructions
Detect circular dependencies between modules/files in an Xcode project using Tarjan's SCC algorithm. Analyzes Package.swift targets and Swift import statements.
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_circular_dependencies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | Analysis level: 'module' for module-level, 'file' for file-level, 'type' for class/struct circular references and retain cycles (default: module) | |
| projectPath | Yes | Path to the Xcode project root directory | |
| excludePatterns | No | Glob patterns to exclude (e.g., ['**/Tests/**']) |