health
Analyze code health with project grading, file metrics, anti-pattern detection, dead code identification, dependency analysis, and test coverage gaps.
Instructions
Code-intelligence (codegraph-compatible) health and analysis facade. Covers codegraph_complexity_heatmap, codegraph_import_graph, codegraph_dependency_matrix, codegraph_dead_code, codegraph_overview, and project/file health metrics in one tool. Pick a capability via action:
action=project — overall project code-quality grade + per-file grade breakdown. Params: min_grade, max_files.
action=file — per-file health: complexity, duplication, style. Params: file_path (required), language.
action=scale — lines-of-code / complexity / size metrics. Params: file_path, file_paths, language, metrics_only, include_complexity, include_details, include_guidance.
action=patterns — anti-pattern detection by category and severity. Params: file_path (required), categories, severity_threshold.
action=heatmap — complexity heatmap ranked by file or function (codegraph_complexity_heatmap equivalent). Params: mode, file_path, function_name, language, directory, max_files.
action=imports — module import dependency graph (who imports whom, codegraph_import_graph equivalent). Params: mode, file_path, max_depth.
action=matrix — coupling matrix and top-k coupling ranks (codegraph_dependency_matrix equivalent). Params: mode, file_path, top_k, threshold.
action=dead — unreferenced functions / unused imports / unused variables (codegraph_dead_code equivalent). Params: mode, include_test_files, max_dead, max_imports, max_variables.
action=routes — HTTP route discovery across framework conventions. Params: mode, url_pattern, file_path, framework.
action=overview — entry-points / hub files / dead-code summary (codegraph_overview equivalent). Params: max_entry_points, max_hubs, max_dead, max_coupled_files.
action=deps — dependency analysis (R5 multi-mode). Params: mode (summary|cycles|blast|file_deps), file_path. mode=summary: project-level dependency overview. mode=cycles: detect circular dependencies. mode=blast: blast-radius for a given file_path. mode=file_deps: file-level dependency details.
action=test_gap — untested symbol discovery ranked by cyclomatic complexity. Params: mode (summary|gaps|file), file_path, language, max_files, max_gaps, include_covered, output_format. For UML diagrams, call/dependency graph visualizations, and similarity analysis, use the
vizfacade instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which capability to invoke. One of: dead, deps, file, heatmap, imports, matrix, overview, patterns, project, routes, scale, test_gap | |
| scope | No | Action discriminator (e.g. point|graph). | |
| mode | No | Action sub-mode (e.g. summary|cycles). | |
| file_path | No | Target file path. | |
| symbol | No | Symbol/function name. | |
| function_name | No | Function name (alias of symbol). | |
| query | No | Search query/pattern. | |
| language | No | Language hint (usually auto). | |
| limit | No | Max results. | |
| output_format | No | Output format (toon|json). |