grep
Search an agent’s stdout or error log stream with native pattern-matching arguments, returning matching lines, exit code, stdout, and stderr.
Instructions
Proxy the host's real grep binary against an agent log stream. args is passed as an argv array with no shell, e.g. ['-in', 'pattern'] or ['-c', '-E', 'a|b']. stream selects stdout or errors; that log path is appended as the final grep file operand. Returns exit code, stdout, and stderr.
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": {
"agent_id": "<agent_id>",
"args": "<args>"
},
"name": "grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | ||
| stream | No | stdout | |
| agent_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||