analyze_codebase_health
Runs five analysis passes to detect code clones, dead symbols, god files, architecture violations, and naming issues. Returns a health score (0-100) and top recommendation.
Instructions
Analyze the health of the ingested codebase.
Runs 5 analysis passes over all fragments in the current session:
Clone Detection — SimHash pairwise scan for Type-1/2/3 code clones
Dead Symbol Analysis — defined but never referenced symbols
God File Detection — files with > μ+2σ reverse dependencies
Architecture Violation Detection — cross-layer imports
Naming Convention Analysis — Python/Rust/React convention breaks
Returns a JSON HealthReport with: - code_health_score [0–100] and health_grade (A/B/C/D/F) - Per-dimension scores: duplication, dead_code, coupling, arch, naming - clone_pairs, dead_symbols, god_files, arch_violations, naming_issues - summary (human-readable) and top_recommendation (most impactful action)
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": "analyze_codebase_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |