Skip to content

Search

Search for regex patterns across files in the project.

ParameterTypeRequiredDescription
patternstringYesRegex pattern to search for
pathstringNoDirectory or file to search in (defaults to working directory)
includestringNoFile glob to filter results (e.g. *.rs, *.ts)
  • Uses Rust regex syntax
  • Returns matching lines with file paths and line numbers
  • Caps results at 200 matches to keep responses manageable
  • Skips binary files and common non-text extensions (.png, .jpg, .exe, .dll, etc.)

Search for a function definition:

{
"pattern": "fn\\s+build_system_prompt",
"include": "*.rs"
}

Search for TODO comments in a specific directory:

{
"pattern": "TODO|FIXME|HACK",
"path": "src/"
}

Search for import statements:

{
"pattern": "^use\\s+crate::",
"include": "*.rs"
}

Find files matching a glob pattern.

ParameterTypeRequiredDescription
patternstringYesGlob pattern to match
pathstringNoDirectory to search in (defaults to working directory)
PatternMeaning
*Match any characters (except /)
**Match any directories recursively
?Match any single character
[abc]Match any character in the set
[a-z]Match any character in the range

Find all Rust source files:

{
"pattern": "**/*.rs"
}

Find test files:

{
"pattern": "**/test*.rs"
}

Find files in a specific directory:

{
"pattern": "*.toml",
"path": "crates/"
}

Find configuration files:

{
"pattern": "**/*.{json,yaml,yml,toml}"
}