serial_connect
Open a serial connection to an STM32 board and keep it active for sending, reading, and disconnecting serial data across tool calls.
Instructions
Open a serial connection to an STM32 board.
Opens the specified serial port and stores the connection for use with serial_send, serial_read, and serial_disconnect. The connection persists across tool calls until explicitly disconnected.
Args: port: Serial port path (e.g., "/dev/cu.usbmodem1234"). Use serial_list_ports to find available ports. baudrate: Baud rate (default 115200).
Returns: Connection status message. The connection_id for subsequent calls is the port path (e.g., "/dev/cu.usbmodem1234") — the same value you passed as the port argument.
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": "<port>"
},
"name": "serial_connect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| baudrate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |