find_duplicates
Locate duplicate code patterns and copy-pasted blocks by pattern, directory, file glob, and minimum block length to identify redundant code for cleanup.
Instructions
Find duplicate code patterns and copy-pasted blocks.
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": "find_duplicates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | No | Specific pattern to search for duplicates | |
| directory | No | Subdirectory to search | |
| file_glob | No | Filter by file pattern | |
| min_length | No | Minimum length of duplicate block in lines (default: 5) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | Yes | ||
| total | Yes | ||
| matches | Yes |