find_clones
Detect duplicated code blocks in a Python project, identifying exact, renamed, and near-miss clones. Returns clone pairs with similarity scores and cluster analysis to help refactor and maintain code quality.
Instructions
Detect code clones (duplicated code blocks) in a Python project. Finds Type-1 (exact), Type-2 (renamed), and Type-3 (near-miss) clones. Returns clone pairs with similarity scores and cluster analysis.
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": {
"path": "<path>"
},
"name": "find_clones"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Directory path to scan for clones. | |
| min_lines | No | Minimum function length to consider (default: 5). | |
| threshold | No | Similarity threshold 0.0-1.0 (default: 0.8). |