ctx_search
Search a codebase for symbols or file paths by name, returning JSON with definitions, signatures, and locations. Use it to locate functions, classes, or types before reading them.
Instructions
Search the project's code graph for symbols or file paths by name and return JSON. Symbol results give {name, parent, kind, path, line, signature}; with files=true results give {path, language, size}. Use to find where a function/class/type is defined before reading it, or to locate files by path fragment. Use ctx_symbol for deep detail on a single exact symbol, and ctx_impact to see what depends on a match. query is a case-insensitive substring/name match. Constrain with kind (function, method, class, struct, trait, enum, interface, type, constant, variable, module, field, constructor, impl) and limit results (default 50, 1-500).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Optional: narrow results to this symbol kind. Omit to match any kind. | |
| files | No | When true, search file paths instead of symbols and return {path, language, size}. Default false. | |
| limit | No | Maximum number of results. Default 50. | |
| query | Yes | Case-insensitive substring to match against symbol names or (when files=true) file paths. Required. Empty or very short queries return many results. |