MCP server to export OpenCode chat history to Markdown
The server defines 3 tools with clear names and basic descriptions, but has critical gaps in schema documentation, parameter descriptions, and output structure. Tool names follow verb_noun convention (list_sessions, export_session, export_all_sessions), which is good. However, input schemas are only partially visible in the provided code, the pyproject.toml and main server.py excerpt show tool registration but the full schema definitions are not fully shown. Based on what is visible: all three tools have descriptions (10-144 chars), but parameter descriptions are minimal. The export_session tool accepts a 'session_id' that could be 'ID prefix, or slug' but these format constraints are buried in the description rather than formalized in the schema. No output schemas are documented anywhere. Error handling is minimal, no recovery guidance, no categorization of errors (retryable vs fatal). The code shows basic data access patterns and markdown rendering but lacks production-grade safeguards. STDIO transport is a hard cap of 50 max, but definition quality alone pulls the overall average down further due to missing schema details.
Export all OpenCode chat sessions to Markdown format
Export a single OpenCode chat session to Markdown format
List all OpenCode chat sessions with session ID, title, slug, project name, date created, and cost
No output schemas documented. Tools return Markdown or lists, but the LLM has no formal description of response structure, field names, or types. This breaks tool chaining and forces LLMs to parse unstructured output.
Parameter descriptions are minimal (3-25 chars) and lack actionable format constraints. 'session_id' is described as 'Session ID, ID prefix, or slug to identify the session' but does not specify format, length, or examples of each variant. This forces LLMs to guess at the input format.
No error handling or recovery guidance in tool descriptions. Code may fail if database is not found, session does not exist, or output directory is not writable, but tool descriptions do not hint at these failure modes or what the LLM should do next.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | 2026-07-28+ | v2 |
export_session and export_all_sessions accept 'output_dir' with a default of '~/opencode-exports', but no constraint on path format or existence. LLMs could pass invalid paths (e.g. with special characters or non-existent parents) with no validation guidance.
list_sessions accepts 'limit' parameter with default of 20 but no minimum/maximum bounds documented. Code does not validate or cap the limit, so an LLM could pass arbitrarily large values causing performance issues.