You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native TypeScript Toolsets for .opencode (code-first tools for subagents) #2237
Add a native TypeScript tool extension so subagents can mount code-defined tools from the repo (e.g., .opencode/tool/*.ts). This complements MCP (generic) and plugins (hooks) with a simple, typed, code-first path.
Problem
• Plugins = lifecycle hooks; MCP = service/protocol overhead.
• No first-class, TS-native way to ship repo-scoped tools with OpenCode context.
Proposal
• Support toolset: in subagent frontmatter to dynamically import a TS module exporting a ToolSet>.
• Tools run with OpenCode context via AsyncLocalStorage (eg. opencode.use()).
• Keep authoring aligned with AI SDK tool().
Subagent config (example)
---description: Agent descmode: subagentmodel: vercel/google/gemini-2.5-protemperature: 0.1tools:
write: trueedit: truebash: trueread: truegrep: trueglob: truetoolset: ./tool/my-agent-toolset.ts---
You are a social media operator.
Activity
rekram1-node commentedon Aug 25, 2025
Not exactly sure what it will look like but user defined tools are on the roadmap
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!