search_code
Find code symbols (functions, classes, methods) by topic or keyword with full-text search. Filter by symbol kind for precise results.
Instructions
Full-text search over indexed symbols (functions, classes, methods, enums, etc.).
Use when looking for symbols by topic or keyword rather than exact name.
Prefer lookup_symbol when you already know the symbol name.
FTS5 syntax:
init*matches init, init_uart, initialize (trailing wildcard)"spi init"matches the exact phrase "spi init"Do NOT use underscore in queries —
modem_initis split intomodem AND init. Usemodem initinstead.
Kind filter values: function, method, constructor,
destructor, class, struct, enum, enum_constant,
typedef, variable, field, namespace.
Args: query: Search term(s) with FTS5 syntax. Keep queries short — 1–3 words. project_root: Absolute path to the project. Defaults to nearest git root. kind: Optional filter to return only symbols of this kind. limit: Maximum number of results (default 20, max 100).
Returns: list of dicts, each with: name, qualified_name, kind, file, line, is_definition, signature, docstring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | FTS5 search terms. 1-3 words, omit underscores. E.g. 'modem init' not 'modem_init'. Supports trailing wildcard 'modem*'. | |
| project_root | No | Project root. Auto-detected if omitted. | |
| kind | No | Optional kind filter: function, method, class, struct, enum, typedef, variable, field, namespace. | |
| limit | No | Maximum results (default 20, max 100). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |