detect_bugs
Scan a repository for potential bugs using AST pattern matching across 10 languages. Detects issues like mutable default arguments, bare excepts, unreachable code, and empty catch blocks.
Instructions
Scan a repository for potential bugs using AST pattern matching. Detects bug patterns across Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, C#, and Kotlin including mutable default arguments, bare excepts, unreachable code, empty catch blocks, missing breaks, and more. Set enrich=true for LLM verification.
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": "detect_bugs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository to scan | |
| min_confidence | No | Minimum confidence threshold (default: medium) | |
| languages | No | Filter to specific languages | |
| enrich | No | Use LLM to verify and explain top findings (default: false) | |
| enrich_top_n | No | Max findings to send to LLM (default: 10, max: 50) | |
| exclude_tests | No | Exclude test files (default: true) | |
| file_path | No | Scope to a single file (relative path) | |
| top_n | No | Maximum findings to return (default: 50, max: 500) |