detect_circular_dependencies
Analyze import graphs to detect circular dependencies between files, causing initialization issues and tight coupling. Returns all detected cycles sorted by length, enabling targeted fixes.
Instructions
Routes to the active/current project automatically when known. Analyze the import graph to detect circular dependencies between files. Circular dependencies can cause initialization issues, tight coupling, and maintenance problems. Returns all detected cycles sorted by length (shorter cycles are often more problematic).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Optional path prefix to limit analysis (e.g., 'src/features', 'libs/shared') | |
| project | No | Optional project selector for this call. Accepts a project root path, file path, file:// URI, or a relative subproject path under a configured root. | |
| project_directory | No | Deprecated compatibility alias for older clients. Prefer project. |