Export opencode coding sessions to self-contained HTML + JSON archives, exposing export capabilities to AI agents
Three tools with complete input schemas and descriptions, but significant quality gaps. Tool names follow verb_noun convention (list_, show_, export_). Descriptions are present but generic (10-80 chars, below the 50-200 char LLM-optimized baseline). Parameters have types and descriptions, but lack constraints (enums, ranges, patterns). Output schemas are partially documented in docstrings but not formally structured. Error handling returns error objects but lacks recovery guidance. No tool annotations (readOnlyHint/destructiveHint). The export_sessions tool accepts a config_path parameter but the code snippet is truncated, preventing full validation.
导出会话为 HTML + JSON 存档到磁盘。
列出 opencode 会话(仅 root sessions)。
查看单个会话的元数据 + 最近消息预览。
Descriptions are too short (10-80 chars vs. 50-200 char baseline). 'list_sessions' description is 30 chars in Chinese; 'export_sessions' is 40 chars. LLMs need 50+ chars to disambiguate when to call each tool.
No enum constraints on string parameters. 'formats' accepts array of strings but lacks enum validation (should be constrained to ['html', 'json']). 'project_directory' is free-form, inviting invalid paths.
Output schemas documented only in docstrings, not formally in tool registration. LLMs cannot parse docstring descriptions of return types; they need structured JSON Schema output definitions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 51 | 2026-07-28+ | v2 |
Error responses lack recovery guidance. When DB not found, returns [{'error': '...'}] but does not suggest next steps (e.g., 'Check OPENCODE_DB env var or run opencode-export init').
No tool annotations. export_sessions is destructive (WRITE risk) but lacks destructiveHint annotation. list_sessions and show_session are read-only but lack readOnlyHint. Agents cannot infer safety without annotations.