serial_read
Retrieve output from an active serial shell session to inspect command responses or logs, with an option to clear the received data after reading.
Instructions
Read output from a serial shell session. Do NOT call this concurrently with serial_exec/serial_write on the same session_id — concurrent access to the same serial console corrupts the output buffer.
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": {
"session_id": "<session_id>"
},
"name": "serial_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Buffer clear flag: 1 (default) = clear buffer after reading, 0 = keep buffer | |
| session_id | Yes | The session ID returned by serial_open |