read_for_duration
Read all incoming serial data for a set duration, collecting bytes with optional encoding. Specify port, time, and max bytes to capture.
Instructions
Read all data from serial port for a specified duration.
Continuously reads data for the specified time period, collecting all received bytes.
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>",
"duration": "<duration>"
},
"name": "read_for_duration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port_id | Yes | The port identifier | |
| duration | Yes | Time to read in seconds | |
| max_bytes | No | Maximum bytes to collect | |
| encoding | No | Encoding for output (or 'raw' for hex only) | utf-8 |