Shareable agentic setup for OpenCode and Claude Code - plugins, skills, and commands from a single codebase, bridged to Claude Code via a stdio MCP server
Server has 9 tools with complete schemas and descriptions. Naming follows verb_noun convention (find_*, trace_*, oc_*). Descriptions are detailed (100-300 chars) and explain WHEN to use each tool. However, several tools lack output schema documentation, parameter descriptions are sometimes generic, and error handling guidance is minimal. No tool annotations (readOnlyHint/destructiveHint) despite clear risk profiles. Composition is sound, tools are single-purpose and chainable. Security: oc_run accepts model/cwd/sessionId but no secrets in params (good). Overall: solid foundation with gaps in output documentation and error recovery guidance.
Locate definitions of functions, classes, or types in a codebase. Returns verified results with exact line numbers. Use this when you know the name of something and want to see its structure/signature.
Find unused symbols (functions, classes, types, interfaces, enums, variables, methods) in a TypeScript/JavaScript codebase. Returns declarations with zero references elsewhere in the project. Exported symbols are included by default with a warning - they may be consumed externally (e.g., by other repos, Dockerfiles, or runtime entry points). Use this as a starting point for dead-code cleanup and refactoring.
Check the status of an async run dispatched via oc_run with mode=async (opencode or claude). Returns running/completed/failed, exit code, sessionId, and - once the run is finished - the full assistant reply parsed from the run log (no truncation). The raw log tail is included only while there is no reply to show (still running, or failed). Use this to poll fanout runs and to recover after a web-terminal reconnect when you only have the runId.
Read message parts for a session from the local OpenCode SQLite database. Replaces the prior oc_get_run_output / oc_get_session_messages split: pass fromEnd=true to get the assistant reply at the tail (e.g. after a short consultation), or fromEnd=false to walk the conversation from the start. Opencode sessions (ses_*) only - claude sessions (UUID ids) are not readable here.
List local OpenCode sessions ordered by last-updated descending. Reads from the host SQLite at ~/.local/share/opencode/opencode.db (or the path under $OPENCODE_DB_PATH).
Output schemas not documented. Tools return markdown/structured text but LLMs cannot parse expected fields. E.g., find_definition returns markdown with Location/Type/code blocks, but no formal schema definition for downstream tool chaining.
No tool annotations (readOnlyHint/destructiveHint/idempotentHint). oc_run is clearly WRITE (Risk: WRITE) but lacks destructiveHint. Codebase tools are READ_ONLY but lack readOnlyHint. Annotations help LLMs reason about safety and retry logic.
Error handling lacks recovery guidance. BaseTool.handleErrors() catches and wraps errors but does not categorize them (retryable vs fatal) or suggest next steps. E.g., 'LSP service failed' tells LLM nothing about whether to retry or call a different tool.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 46 | <=2025-11-25 | v2 |
Dispatch a local agentic run against a model. The model id picks the CLI: provider-prefixed ids (openai/...) run `opencode`, bare claude ids or aliases (fable/opus/sonnet/haiku) run `claude`. Two modes: sync (block, return final reply + sessionId) and async (background, return runId + sessionId immediately for later polling via oc_get_run_status). Pass sessionId to continue an existing conversation within the same runtime; omit to start a new one. Always pass `model` explicitly - the platform default is not stable across orchestrator restarts.
Search local OpenCode sessions by substring match against the title or any message part content. Reads from the host SQLite at ~/.local/share/opencode/opencode.db. Opencode sessions only - claude sessions (UUID ids) never appear here.
Get a tree-like view of the project structure to understand the codebase organization. This tool helps you explore unfamiliar projects by showing the directory hierarchy, file counts, and basic statistics. Use this as a starting point when working with a new codebase.
Find all usages of functions, classes, or types across a codebase. Returns results grouped by file with verified line numbers. Use this for refactoring - to find all call sites before renaming or modifying something.
oc_run lacks confirmation/dry-run for destructive operations. Accepts mode=sync/async but no dry_run flag. Agents can dispatch arbitrary commands without preview, risking unintended side effects.
Parameter descriptions sometimes generic. E.g., oc_run 'prompt' param says 'Prompt text or, when command is set, the command arguments' but does not specify format constraints, max length, or escaping rules. LLMs may pass unescaped shell metacharacters.