Get Coupling Metrics
get_coupling_metricsMeasure code coupling, cohesion, and instability by module or layer to identify refactoring candidates and architectural hotspots.
Instructions
Measure how tangled your code is. Returns coupling (cross-boundary dependencies), cohesion (within-group dependencies), and instability scores. High coupling + low cohesion = refactoring candidates. Start with group_by: "layer" for the architectural health view ("are my controllers more coupled than my services?"), then drill into group_by: "module" for specific hotspots.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_coupling_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name (required in multi-project mode). Use list_projects to see available projects. | |
| group_by | No | Group entities by module or layer (default: module) |