grep_file
Search a file using regex patterns, returning matching lines with line numbers and optional surrounding context.
Instructions
Regex-search a single file, returning matching lines with numbers.
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": {
"path": "<path>",
"pattern": "<pattern>"
},
"name": "grep_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pattern | Yes | ||
| max_matches | No | ||
| context | No | ||
| ignore_case | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||