search_code
Search repository files for literal text or regular expressions, returning matched lines with line numbers and file paths. Use optional path, case sensitivity, and result limits to focus code searches.
Instructions
Search for literal text or regular expressions across repository files.
Args: query: The substring or regex to search for. path: Optional relative directory or file to constrain search scope. is_regex: Whether query is a regular expression (default: False). case_sensitive: Whether match should be case-sensitive (default: False). max_results: Maximum matching lines to return (default: 50).
Returns: JSON string with matched lines, line numbers, and file paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| query | Yes | ||
| is_regex | No | ||
| max_results | No | ||
| case_sensitive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |