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
v2 codemode: tools.search is unavailable in the execute runtime #45349
Code Mode documents tools.search(...) as the mechanism to discover tools in its runtime, but the dispatcher does not register it. Explicitly catalogued MCP tools work through execute; the documented discovery function does not.
Environment
opencode version: 0.0.0-beta-18155
OS: Linux 7.0.0-30-generic (x64)
Shell: zsh
Install/channel: beta
Reproduction
Start a fresh OpenCode session with the Context7 MCP server connected.
Run an explicitly catalogued tool inside the execute runtime:
tools.search(...) should resolve against the final Code Mode tool tree and return the matching tool signatures.
Actual Behavior
The documented discovery tool is unavailable in the execute runtime:
Unknown tool 'search'.
Additional Context
Reproducible after restarting the OpenCode service and starting a fresh session.
This is not an MCP connection or authentication failure: context7.resolve-library-id succeeds in the same execute invocation.
The failure is especially impactful for partial MCP catalogs, where tools.search(...) is the documented path to discover tools omitted from the initial prompt.
Thanks for the report. There appears to be a misunderstanding about the discovery API: Code Mode's instructions specify search(...), not tools.search(...).
An Unknown tool 'search'. error from tools.search(...) does not demonstrate that the documented discovery function is missing; it calls a different path.
We're closing this as cannot reproduce as reported. If you can share an actual session transcript showing OpenCode instructing the model to call tools.search(...), or the correct search(...) call failing, we'll investigate further. Please include the exact instructions, tool-call input, and returned output, with credentials and private information redacted.
Activity
rekram1-node commentedon Aug 26, 2026
This is not correct.
opencode-agent commentedon Aug 26, 2026
Thanks for the report. There appears to be a misunderstanding about the discovery API: Code Mode's instructions specify
search(...), nottools.search(...).For reference, in the V2 source:
searchwhen the catalog is partial. The signature inserted into those instructions explicitly starts withsearch(input: ...), without atools.prefix.searchas a separate global, alongsidetools; it is not a tool undertools.search(...)against a Context7-shaped tool and checks the returned signature.The discovery call inside
executeshould therefore be:An
Unknown tool 'search'.error fromtools.search(...)does not demonstrate that the documented discovery function is missing; it calls a different path.We're closing this as cannot reproduce as reported. If you can share an actual session transcript showing OpenCode instructing the model to call
tools.search(...), or the correctsearch(...)call failing, we'll investigate further. Please include the exact instructions, tool-call input, and returned output, with credentials and private information redacted.