summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAriane Emory <[email protected]>2026-02-05 16:55:50 -0500
committerGitHub <[email protected]>2026-02-05 15:55:50 -0600
commitbccd568993edec61350f3fecbca621b36904e4cf (patch)
tree21f86311a4decd355353b0c6620a55f85275564c /packages
parentfd8c2fb0cd5943d9b3fd3e9c5d1d5cd2f6931cb8 (diff)
downloadopencode-bccd568993edec61350f3fecbca621b36904e4cf.tar.gz
opencode-bccd568993edec61350f3fecbca621b36904e4cf.zip
docs: websearch tool (#12359)
Diffstat (limited to 'packages')
-rw-r--r--packages/web/src/content/docs/tools.mdx33
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/tools.mdx b/packages/web/src/content/docs/tools.mdx
index 0fa8d4ffd..68513324e 100644
--- a/packages/web/src/content/docs/tools.mdx
+++ b/packages/web/src/content/docs/tools.mdx
@@ -286,6 +286,39 @@ Allows the LLM to fetch and read web pages. Useful for looking up documentation
---
+### websearch
+
+Search the web for information.
+
+:::note
+This tool is only available when using the OpenCode provider or when the `OPENCODE_ENABLE_EXA` environment variable is set to any truthy value (e.g., `true` or `1`).
+
+To enable when launching OpenCode:
+
+```bash
+OPENCODE_ENABLE_EXA=1 opencode
+```
+:::
+
+```json title="opencode.json" {4}
+{
+ "$schema": "https://opencode.ai/config.json",
+ "permission": {
+ "websearch": "allow"
+ }
+}
+```
+
+Performs web searches using Exa AI to find relevant information online. Useful for researching topics, finding current events, or gathering information beyond the training data cutoff.
+
+No API key is required — the tool connects directly to Exa AI's hosted MCP service without authentication.
+
+:::tip
+Use `websearch` when you need to find information (discovery), and `webfetch` when you need to retrieve content from a specific URL (retrieval).
+:::
+
+---
+
### question
Ask the user questions during execution.