Search file contents
file_grepSearch file contents recursively for a regex pattern, returning matching lines. Use with a root path and pattern to locate specific text across files.
Instructions
Recursively search file contents for a regex pattern. Prefers ripgrep, falls back to grep or pure Python.
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": {
"root": "<root>",
"pattern": "<pattern>"
},
"name": "file_grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | ||
| pattern | Yes | ||
| max_matches | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |