grep
Use regular expressions to search file contents and find matching paths, line numbers, and lines. Optionally filter by file patterns like *.js.
Instructions
Fast regular-expression content search for codebases of any size. The optional include parameter filters searched files, for example *.js or *.{ts,tsx}. Returns matching paths, line numbers, and matching lines.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pattern": "<pattern>"
},
"name": "grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The directory to search in. Defaults to the current working directory. | |
| include | No | File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}") | |
| pattern | Yes | The regex pattern to search for in file contents |