check_duplication
Check for duplicate function or class names in your codebase before creating new code. Prevents logic duplication by identifying existing symbols with similar names and scoring their similarity.
Instructions
Check if a function/class name already exists elsewhere in the codebase before creating it. Prevents duplicating existing logic. Call with just a name when planning new code, or symbol_id to check an existing symbol. Returns scored matches — score ≥0.7 means high likelihood of duplication, review the existing symbol before proceeding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol_id | No | Existing symbol ID to check for duplicates | |
| name | No | Function/class name to check (when symbol_id not available) | |
| kind | No | Symbol kind to narrow search (default: function) | |
| threshold | No | Minimum similarity score to report (default: 0.60) |