detect_duplication
Find exact structural duplicate code blocks by comparing AST fingerprints, ignoring identifier names and literal values. Works on a single file or across a whole project.
Instructions
Detect duplicate code blocks by comparing AST structure fingerprints. Matches are exact structural duplicates, ignoring identifier and literal values, so renamed copies are found but near-misses with an extra statement are not.
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": "detect_duplication"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Path to file (relative to project root). Omit for project-wide analysis. | |
| minNodes | No | Minimum AST node count for a block to be considered (default: 20) | |
| minStatements | No | Minimum statements in a block (default: 3) |