search
Search indexed code and documentation using natural-language queries. Returns ranked results with file signatures for quick triage, or full code bodies for immediate use.
Instructions
Semantic + lexical (hybrid) search over an indexed source. This is your PRIMARY search tool — use it FIRST for any question about the indexed code or docs. Omit source to search ALL sources at once (rankings fused via RRF, each hit tagged with its source); pass source to target one. Configured sources: . Best practices: use natural-language descriptions of what the code does, not exact identifiers (use grep for those). Good: 'method that handles player damage calculation'. Bad: 'CalculateDamage'. Args: query (natural language); source (optional name); top_k (default from config); file_glob, extensions, path_contains (optional filters). For broad/exploratory queries, or a large top_k, set outline=true to get signatures-only results (much cheaper to read): scan them, then pull just the one body you need with find_definition or its file:line. Use the default (full bodies) when you'll work with the code right away.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural-language description of the behavior to find (e.g. 'method that handles player damage calculation'), NOT an identifier — use grep for exact names. | |
| top_k | No | Maximum number of results to return. Defaults to the server's configured value. | |
| source | No | Source name from `list_sources`. Omit to use the default: all sources for `search`/`deep_search` (RRF-fused), or the single applicable source for the others. | |
| outline | No | If true, return each hit's signature + first doc line instead of its full body — cheap triage for broad queries or a large top_k. Scan the signatures, then read the one body you need (find_definition, or its file:line). Default false = full bodies, for when you'll use the code right away. | |
| file_glob | No | fnmatch glob to restrict results by path/filename, e.g. `*.cs` or `**/Editor/*`. | |
| extensions | No | Restrict results to these file extensions, e.g. `['.cs', '.shader']`. | |
| path_contains | No | Keep only results whose file path contains this substring. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |