search
Search files for patterns using ripgrep (rg). Define patterns, specify paths, filter by file type, and control case sensitivity. Ideal for high-performance text searches across directories or specific files.
Instructions
Search files for patterns using ripgrep (rg)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
caseSensitive | No | Use case sensitive search (default: auto) | |
context | No | Show N lines before and after each match | |
filePattern | No | Filter by file type or glob | |
maxResults | No | Limit the number of matching lines | |
path | Yes | Directory or file(s) to search. | |
pattern | Yes | The search pattern (regex by default) | |
useColors | No | Use colors in output (default: false) |
Input Schema (JSON Schema)
{
"properties": {
"caseSensitive": {
"description": "Use case sensitive search (default: auto)",
"type": "boolean"
},
"context": {
"description": "Show N lines before and after each match",
"type": "number"
},
"filePattern": {
"description": "Filter by file type or glob",
"type": "string"
},
"maxResults": {
"description": "Limit the number of matching lines",
"type": "number"
},
"path": {
"description": "Directory or file(s) to search.",
"type": "string"
},
"pattern": {
"description": "The search pattern (regex by default)",
"type": "string"
},
"useColors": {
"description": "Use colors in output (default: false)",
"type": "boolean"
}
},
"required": [
"pattern",
"path"
],
"type": "object"
}