get_complexity_metrics
Analyze source code complexity with AST-based metrics including cyclomatic complexity, nesting depth, and function counts. No prior indexing needed.
Instructions
Analyze code complexity for a source file using tree-sitter AST parsing. Returns function/class counts, line metrics, cyclomatic complexity, nesting depth, and parameter counts.
No prior indexing required.
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": {
"repo_path": "<repo_path>",
"file_path": "<file_path>"
},
"name": "get_complexity_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| file_path | Yes | File path relative to repo root to analyze |