serial_write
Send a command to an active serial shell session to interact with an embedded device. Use this tool for writing shell input while avoiding concurrent reads that corrupt the output buffer.
Instructions
Send a command to a serial shell session. Do NOT call this concurrently with serial_exec/serial_read on the same session_id — concurrent access to the same serial console corrupts the output buffer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Buffer clear flag: 1 (default) = clear buffer before collecting, 0 = append to buffer | |
| command | Yes | The command to send to the shell | |
| session_id | Yes | The session ID returned by serial_open |