grep_files_with_matches
Search and list files containing a specific pattern in a target directory. Supports regex, case sensitivity, whole word matching, file extensions, and exclusion patterns for precise results.
Instructions
List only the names of files that contain the pattern
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| case_sensitive | No | Whether the search should be case sensitive | |
| exclude_patterns | No | Exclude files matching these patterns | |
| file_extensions | No | Only search files with these extensions | |
| pattern | Yes | Regular expression pattern or plain text to search for | |
| target | Yes | Directory path to search in | |
| whole_words | No | Match whole words only |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"case_sensitive": {
"default": false,
"description": "Whether the search should be case sensitive",
"type": "boolean"
},
"exclude_patterns": {
"description": "Exclude files matching these patterns",
"items": {
"type": "string"
},
"type": "array"
},
"file_extensions": {
"description": "Only search files with these extensions",
"items": {
"type": "string"
},
"type": "array"
},
"pattern": {
"description": "Regular expression pattern or plain text to search for",
"type": "string"
},
"target": {
"description": "Directory path to search in",
"type": "string"
},
"whole_words": {
"default": false,
"description": "Match whole words only",
"type": "boolean"
}
},
"required": [
"pattern",
"target"
],
"type": "object"
}