find_similar
Find declarations most similar in meaning to a given function or node, revealing sibling handlers, copy-paste variants, and review peers. Uses cached embeddings for offline retrieval.
Instructions
Read-only. Given one declaration (by node id or exact name), return the declarations most like it by meaning — a 'what else looks like this' over the same local embedding model as concept_search, reusing its cached vectors (no re-embedding). A retrieval lead only: useful for finding sibling handlers, copy-paste variants, or the peers of a function under review. Offline-only; with no model installed it returns an explanatory note, not results.
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": {
"name": "<name>"
},
"name": "find_similar"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | node id or exact declaration name to anchor on | |
| limit | No | ||
| model | No | BAAI/bge-small-en-v1.5 | |
| format | No | text (compact, default) | json (structured result page) | |
| min_score | No |