gograph_complexity
Discover Go functions with high cyclomatic complexity to prioritize refactoring in code quality audits.
Instructions
Report estimated cyclomatic complexity for Go functions, sorted highest-to-lowest with severity labels (LOW/MEDIUM/HIGH/VERY HIGH). The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. Optional symbol substring filters to a specific function or set of functions. WHEN TO USE: During code quality audits, identifying functions that need decomposition, or setting complexity budgets in CI. NOT TO USE: For import dependency metrics (use gograph_coupling or gograph_deps); for God Object detection (use gograph_godobj). RETURNS: Structured list of functions with complexity score and severity label; empty when no functions match the filter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Optional Go function or method symbol name substring to filter the complexity report (e.g., 'Build') |