Brave Search as a custom tool for opencode. One TypeScript file, two arguments, replacing the Brave MCP server's eight tools. Measured at 222 context tokens against 9,879, and ~1,200 per search against ~4,200, by trimming results to titles, URLs and snippets.
A custom opencode tool that adds web search backed by the Brave Search API. opencode's own `websearch` tool routes through Exa's hosted service and is only available on the opencode provider or with `OPENCODE_ENABLE_EXA` set. This one calls Brave directly, works on any provider, and returns a compact result list instead of a full API response object.