Server has 6 tools with complete input schemas and descriptions. Naming follows verb_noun convention (list_ports_tool, open_port, close_port, read_port, write_port, get_port_config). Descriptions are present and substantive (100-200 chars typical), explaining what each tool does and listing exceptions. However, parameter descriptions lack constraint details (e.g., baud_rate accepts 20 specific values but description says 'default: 9600' without listing valid options). Output schemas are not documented, callers cannot predict return structure. Error handling lists exception types but provides no recovery guidance. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels (WRITE vs READ_ONLY). Validation logic exists in code (_validate_baud_rate, _validate_parity) but constraints are not exposed in parameter descriptions or schemas.
Close an open serial port connection. Args: port: The name of the port to close. Returns: True if the port was closed successfully. Raises: PortNotFoundError: If the port does not exist or is not open.
Get the current configuration of an open serial port. Args: port: The name of the port to query. Returns: Dictionary containing the port configuration. Raises: PortNotFoundError: If the port is not open.
Tool to list all available serial ports. Returns: List of available serial ports with their details.
Open a serial port connection. Args: port: The name of the port (e.g., "COM1", "/dev/ttyUSB0"). baud_rate: The baud rate for communication (default: 9600). parity: Parity mode - "none", "even", "odd", "mark", "space" (default: "none"). stop_bits: Number of stop bits - 1, 1.5, or 2 (default: 1). data_bits: Number of data bits - 5, 6, 7, or 8 (default: 8). timeout: Read timeout in seconds (default: 1.0). Returns: True if the port was opened successfully. Raises: PortNotFoundError: If the port does not exist. PortAlreadyOpenError: If the port is already open. PortInUseError: If the port is in use by another process. InvalidParameterError: If any parameter is invalid.
Read data from an open serial port. Args: port: The name of the port to read from. size: Maximum number of bytes to read (default: 4096, max: 4096). timeout: Optional timeout override in seconds. Returns: Hex-encoded string of the data read. Empty string if no data available. Raises: PortNotFoundError: If the port is not open.
Parameter constraints not exposed in descriptions. baud_rate accepts only 20 specific values (50, 75, 110, ..., 921600) but description says 'default: 9600' without listing valid options. parity, stop_bits, data_bits similarly lack enumerated constraints. LLMs will hallucinate invalid values.
Output schemas not documented. Tools return lists, dicts, booleans, and integers but callers cannot predict structure. E.g., list_ports_tool returns 'list[dict[str, str]]' with keys 'name', 'description', 'hwid', not stated in tool definition. Agents cannot plan downstream calls.
Error handling lists exception types but provides no recovery guidance. 'Raises: PortNotFoundError' tells the LLM nothing about what to do next. Should include hints like 'If port not found, call list_ports_tool() to see available ports.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2026-07-28+ | v2 |
Write data to an open serial port. Args: port: The name of the port to write to. data: Hex-encoded string of data to write (e.g., "48656c6c6f" for "Hello"). Returns: Number of bytes written. Raises: PortNotFoundError: If the port is not open. InvalidParameterError: If the data is not valid hex.
Tool annotations missing. open_port, close_port, write_port are destructive (WRITE risk) but lack destructiveHint annotation. read_port, list_ports_tool, get_port_config are read-only but lack readOnlyHint. Agents cannot distinguish safe from risky tools.
Hex encoding requirement for write_port not validated at tool boundary. Description says 'Hex-encoded string' but no validation that input is valid hex. Invalid hex passes to pyserial, which may fail cryptically. Should validate and return 'Invalid hex: expected pairs of 0-9a-fA-F'.