find_similar_code
Finds semantically similar functions, classes, or methods from a symbol ID to reveal alternative implementations and repeated code patterns across repositories.
Instructions
Vector similarity search for code patterns. Given a symbol ID, finds semantically similar functions, classes, or methods across the codebase. Useful for discovering alternative implementations or repeated patterns.
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": {
"symbol_id": "<symbol_id>"
},
"name": "find_similar_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Filter to a specific repository (as shown in list_repos) | |
| symbol_id | Yes | Symbol identifier (from search_symbols or get_file_outline results) | |
| max_results | No | Maximum similar symbols to return (default: 10) |