Peek at SSH command output
ssh_peekMonitor a running remote command's latest output without starting a new session. Wait for command completion or retrieve recent stdout/stderr lines and exit status.
Instructions
Observe the current foreground command and its latest output without starting another command. When status=running, optional wait_sec (default 0) long-polls this MCP call until the command finishes or the wait expires—prefer a positive wait_sec over busy-looping. wait_sec never stops the remote command. Returns the newest lines in chronological order, limited independently for stdout and stderr; lines defaults to 50 and is capped to protect model context. Use after ssh_run returns status=running. When idle, returns immediately with cwd, last exit code, and the latest lines from the completed command.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| lines | No | ||
| wait_sec | No |