UART serial port MCP server: expose local serial ports to AI assistants as standard MCP tools
ser2mcp demonstrates solid definition quality with comprehensive parameter schemas and detailed descriptions across 14 tools. All tools have explicit input schemas with typed parameters and descriptions. Tool names follow verb_noun convention (uart_open, uart_read, uart_write). However, descriptions are verbose (often 200+ chars) and could be more concise for LLM parsing. Output schemas are not formally documented in the visible code. Error handling guidance is minimal, most tools lack recovery hints. Security considerations (file path validation, permission checks) are mentioned in INSTRUCTIONS but not enforced at tool level.
状态快照(含缓冲统计、读线程错误与发送进度)
清空未读缓冲
关闭串口(进行中的文件发送会被中断)
运行时重配置(仅更新传入项)
写 + 读(同一 I/O 临界区;短命令、idle 收尾)
等待匹配输出(可选"发送+等待";内容匹配语义)
匹配后立即发送(等待→命中→发送一步原子完成)
枚举本机可用串口
Output schemas not formally documented. Tools return complex nested objects (e.g., uart_read returns data, reason, pending, overflow_delta, new_data_observed) but no JSON Schema definitions visible in code. LLMs cannot plan downstream tool calls without knowing return structure.
Descriptions are verbose (often 150-300+ chars) and contain implementation details (e.g., 'uart_read' describes idle_ms, max_bytes, timeout_ms logic in one sentence). Descriptions should be 50-150 chars stating WHAT and WHEN, with parameter details in param descriptions.
Error handling lacks recovery guidance. No tool description states what to do if a port is not found, file is unreadable, or pattern never matches. INSTRUCTIONS mention error cases but tools themselves do not guide LLM recovery.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2025-06-18+ | v2 |
打开串口(全量串口参数 + 内部参数:缓冲区大小等)
拉取缓冲(空闲判定/上限/超时三种返回条件)
中止进行中的文件发送
文件发送耗时/字节数估算(无需打开串口)
文件流式发送(分片限速,服务器内部循环一次调用)
只发不等
File path parameter (uart_send_file, uart_send_estimate) accepts arbitrary local paths. INSTRUCTIONS warn about user authorization but tool itself does not validate or restrict paths. No permission gate or path sanitization visible.
Parameter constraints not fully formalized. uart_open.baudrate accepts 50..=4000000 but constraint is in description text, not JSON Schema minValue/maxValue. LLMs cannot parse text constraints reliably.