waitForTerminalOutput
Blocks script execution until terminal output matches a given JavaScript regex. Returns matched line and elapsed time, or indicates timeout.
Instructions
Block until regex matches terminal output. Returns {matched, matchedLine, elapsed} or timedOut.
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": "waitForTerminalOutput"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Terminal name (from listTerminals). Uses active if omitted. | |
| index | No | Terminal index (0-based) from listTerminals. Used if name omitted. | |
| pattern | Yes | JS regex to match against terminal output lines | |
| timeout | No | Seconds to wait (default: 30, max: 300) |