Read terminal output
terminal_readRead buffered output from a persistent shell session, returning recent lines or only new output since a provided cursor so agents can inspect command results and logs.
Instructions
Read buffered output from a session. Without "since", returns the last "lines" lines. Pass the previously returned nextSince value to get only new output since that point.
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": {
"id": "<id>"
},
"name": "terminal_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session id (for example "term_1a2b3c4d") or the friendly name given at spawn time. | |
| raw | No | Return raw bytes with ANSI escapes and carriage returns intact. Default false. | |
| lines | No | When "since" is omitted, return at most this many trailing lines. Default 200. | |
| since | No | Only return output with a sequence number at or after this cursor. |