get_design_smells
Detect design smells like God Class, Long Method, Long Parameter List, and Feature Envy using AST-based heuristics. Returns severity, file location, and refactoring suggestions.
Instructions
Detect common design smells using heuristic AST-based thresholds: God Class (>15 methods AND >500 lines), Long Method (>80 lines AND cyclomatic complexity >7, or CC >15), Long Parameter List (>6 params), Feature Envy (>3 calls to another class's methods), Large File (>800 lines), Deep Nesting (>4 levels), Data Clump (3+ functions share 3+ identical parameter names). Returns smells with severity, file location, entity name, description, and refactoring suggestion.
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>"
},
"name": "get_design_smells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| severity_threshold | No | Minimum severity to include (default: medium) | |
| exclude_tests | No | Exclude test files (default: true) | |
| top_n | No | Limit output to the top N smells sorted by severity (optional, returns all if omitted) | |
| summary_only | No | Return only a smells_by_type count dict instead of individual smell records (default: false) |