[analysis]
Analyzes code complexity metrics including cyclomatic complexity, lines of code, and method counts.
| Name | Type | Required | Description |
|---|---|---|---|
| typeName | string | No | Analyze a specific type. |
| filePath | string | No | Analyze a specific file. |
| projectName | string | No | Optional project name to limit the search scope. |
Analyze complexity across the solution
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "analyze_complexity",
"arguments": {}
}
}{
"success": true,
"data": {
"summary": {
"totalTypes": 12,
"totalMethods": 84,
"totalLinesOfCode": 3200,
"averageComplexity": 3.1,
"maxComplexity": 12,
"highComplexityMethodCount": 4
},
"types": [
{
"name": "SolutionManager",
"fullName": "Glider.Services.SolutionManager",
"kind": "Class",
"filePath": "/path/to/SolutionManager.cs",
"linesOfCode": 240,
"methodCount": 8,
"averageComplexity": 2.4,
"methods": [
{
"name": "LoadSolutionAsync",
"cyclomaticComplexity": 4,
"linesOfCode": 32,
"parameterCount": 1,
"lineNumber": 58
}
]
}
]
},
"error": null
}Returns summary metrics and per-type complexity details
Go to Playground to test this tool interactively.