file_grep
Search a file for a fixed string to find errors in large logs. Provide an absolute path and pattern, and limit returned matching lines.
Instructions
Search a file for a fixed string. Useful for finding an error in a large log.
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": "file_grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | target host name from the opsgate config; omit for the default host | |
| path | Yes | absolute file path to search | |
| lines | No | maximum matching lines to return (default 100, max 1000) | |
| pattern | Yes | fixed string to search for (not a regular expression) |