serial_exchange
Execute a command on an embedded board via serial: temporarily lease it, send the request, wait for the expected prompt or silence, strip the echo, and restore the previous lease state.
Instructions
Atomic composite command execution:
Acquires lease temporarily if not already held.
Transmits command with newline.
Waits for expected prompt or output silence.
Automatically strips echo.
Cleanly restores previous lease state.
Args: board_id: The identifier of the board (e.g. 'board_a') request: Command to execute (e.g. 'help' or 'status') timeout_ms: Maximum duration in milliseconds to wait for reply (default: 1000) expected_prompt: Optional prompt to wait for (e.g. '> ' or 'shell#')
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": {
"board_id": "<board_id>",
"request": "<request>"
},
"name": "serial_exchange"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | ||
| board_id | Yes | ||
| timeout_ms | No | ||
| expected_prompt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |