Start an advanced search
start_searchRead-only
Search a folder in the background by file name or by text inside files, with optional regular expression, file-type filter (for example ".js,.ts") and lines of context around each match. Returns the first results and a search_id; use get_more_search_results for the rest. Good for big folders and many matches.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Default "name". | |
| path | Yes | Folder to search in. | |
| regex | No | Treat pattern as a regular expression. Default false. | |
| device | No | Device name. Optional when the account has only one online device. | |
| pattern | Yes | What to look for: a name pattern (name mode) or text (content mode). Treated as a regular expression when regex is true. | |
| ignore_case | No | Default true. | |
| max_results | No | Results to return per call, default 100, max 500. | |
| file_pattern | No | Content mode only: only search files whose name matches, for example "*.js" or "*.js,*.ts". | |
| context_lines | No | Content mode only: lines to show before and after each match, 0 to 5. Default 0. |