MCP server for controlling serial devices via AI agents
Three tools with complete schemas and descriptions, but descriptions are verbose (200+ chars) and lack LLM-optimized structure. Tool names follow verb_noun pattern (list_ports, connect, write_and_read). Schemas are properly typed with defaults. However, descriptions bury key information in prose rather than stating WHAT/WHEN/WHY concisely. Error handling is present but not recovery-focused. No parameter validation constraints (enums, ranges) despite accepting free-form strings. Missing output schema documentation for write_and_read.
指定したシリアルポートに接続する。 port には list_ports で取得した device 名を指定する。 すでに接続中の場合は、内部で既存接続を閉じてから再接続する。 Args: port: 接続ポート名 (例: /dev/cu.usbserial-10, COM3) baudrate: 通信速度 (default: 19200) line_ending: コマンド末尾に付加する改行コード "\r" (CR only, default) "\r\n" (CR+LF) "\n" (LF only)
接続されているすべてのシリアルポートの情報を返す。 connect の呼び出し前に必ず実行し、利用可能なポート(device名)を確認すること。 macOSでは /dev/cu.* を優先的に返す(/dev/tty.* はカーネル内部用のため除外)。 Returns: list of dict with keys: - device: OS固有の識別子 (例: COM3, /dev/cu.usbserial-10) - description: デバイス名 - hwid: ハードウェアID (VID:PID)
シリアルポートにコマンドを送信し、応答を受信して返す。 事前に connect を実行しておくこと。 行末には connect で設定した line_ending が自動付加される。 wait_for にプロンプト文字列(例: "> ")を指定すると、 その文字列が受信データに現れるまで待機する。 送受信データはすべてログファイルに記録される。 Args: command: 送信する文字列 wait_for: この文字列が出現するまで受信を待機する(省略可) timeout: 最大待機時間(秒)
Tool name 'write_and_read' violates single-responsibility principle, combines two actions (write + read). Should be split into 'send_command' and 'read_response' or renamed to 'send_command_and_wait_for_response' for clarity.
Descriptions are verbose (200+ chars) and prose-heavy. LLM-optimized descriptions should be 50 - 150 chars, stating WHAT/WHEN/WHY upfront. Current descriptions bury key info in multi-line explanations.
Parameter 'line_ending' in connect() accepts free-form strings but should be an enum (\r, \r\n, \n). Current description lists options but no schema constraint prevents invalid values.
write_and_read() output schema not documented. LLMs need to know the return type (string) and what fields/structure to expect for downstream tool chaining.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | 2026-07-28+ | v2 |
Error messages are user-friendly but lack recovery guidance. E.g., 'Permission denied' error should suggest 'Try: sudo usermod -aG dialout $USER' as a next step, not just in the message text.