search_code
Finds functions across indexed repositories by meaning from natural-language queries, returning symbol, file, line range, and summary pointers so you can locate code when the name is unknown.
Instructions
Semantic search over indexed repos' functions BY MEANING.
Use for conceptual questions where you don't know the name of the
code: "where do we cache the signing keys", "code that retries
deleting a temp file", "how are search scores from two lists merged".
Do NOT use for literal identifiers, exact strings, or error messages
— use Grep for those.
Searches every indexed repo; pass repo="name" to search only one.
Returns up to k pointers: function name, file path relative to the
repo root, line range, kind, and the first sentence of an LLM-written
summary. Never returns source code: open the file in your checkout
(or grep the function name) to get the truth. The index is a snapshot
at one commit (see index_status): line numbers may have drifted, and
code written after that commit is not in it. Similarity is not
confidence — if the results look unrelated to each other, the concept
probably isn't in the index.
mode: "summary" (default, compares the query to each function's
summary), "code" (to the raw source), or "hybrid" (both, fused).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| mode | No | ||
| repo | No | ||
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |