1Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).
 2
 3<usage>
 4- Provide regex pattern to search within file contents
 5- Set literal_text=true for exact text with special characters (recommended for non-regex users)
 6- Optional starting directory (defaults to current working directory)
 7- Optional include pattern to filter which files to search
 8- Results sorted with most recently modified files first
 9</usage>
10
11<regex_syntax>
12When literal_text=false (supports standard regex):
13
14- 'function' searches for literal text "function"
15- 'log\..\*Error' finds text starting with "log." and ending with "Error"
16- 'import\s+.\*\s+from' finds import statements in JavaScript/TypeScript
17</regex_syntax>
18
19<include_patterns>
20- '\*.js' - Only search JavaScript files
21- '\*.{ts,tsx}' - Only search TypeScript files
22- '\*.go' - Only search Go files
23</include_patterns>
24
25<limitations>
26- Results limited to 100 files (newest first)
27- Performance depends on number of files searched
28- Very large binary files may be skipped
29- Hidden files (starting with '.') skipped
30</limitations>
31
32<ignore_support>
33- Respects .gitignore patterns to skip ignored files/directories
34- Respects .crushignore patterns for additional ignore rules
35- Both ignore files auto-detected in search root directory
36</ignore_support>
37
38<cross_platform>
39- Uses ripgrep (rg) if available for better performance
40- Falls back to Go implementation if ripgrep unavailable
41- File paths normalized automatically for compatibility
42</cross_platform>
43
44<tips>
45- For faster searches: use Glob to find relevant files first, then Grep
46- For iterative exploration requiring multiple searches, consider Agent tool
47- Check if results truncated and refine search pattern if needed
48- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)
49</tips>