read_until
Reads data from a serial port until a specified terminator string is received, enabling line-based protocol handling.
Instructions
Read from serial port until a terminator string is received.
Useful for reading line-based protocols (terminator='\n').
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": {
"port_id": "<port_id>"
},
"name": "read_until"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port_id | Yes | The port identifier | |
| terminator | No | Stop reading when this string is received | |
| timeout | No | Maximum time to wait in seconds | |
| max_bytes | No | Maximum bytes to read | |
| encoding | No | Encoding for terminator and output | utf-8 |