summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-10-08 15:58:57 -0400
committerJay V <[email protected]>2025-10-09 13:19:51 -0400
commitf3b50219368f0277a4d003e1b1fd05c7daacd0fe (patch)
tree9c317751d581d4f395af12ffdf40aa3ef80c0cee /packages
parent7be9a84b72526ec9986c855d60f8b8bbca99392d (diff)
downloadopencode-f3b50219368f0277a4d003e1b1fd05c7daacd0fe.tar.gz
opencode-f3b50219368f0277a4d003e1b1fd05c7daacd0fe.zip
docs: adding tools doc
Diffstat (limited to 'packages')
-rw-r--r--packages/web/astro.config.mjs1
-rw-r--r--packages/web/src/content/docs/agents.mdx42
-rw-r--r--packages/web/src/content/docs/config.mdx18
-rw-r--r--packages/web/src/content/docs/custom-tools.mdx2
-rw-r--r--packages/web/src/content/docs/tools.mdx4
-rw-r--r--packages/web/src/content/docs/zen.mdx1
6 files changed, 36 insertions, 32 deletions
diff --git a/packages/web/astro.config.mjs b/packages/web/astro.config.mjs
index fb7bd75b5..3bcd98cb7 100644
--- a/packages/web/astro.config.mjs
+++ b/packages/web/astro.config.mjs
@@ -74,6 +74,7 @@ export default defineConfig({
{
label: "Configure",
items: [
+ "tools",
"rules",
"agents",
"models",
diff --git a/packages/web/src/content/docs/agents.mdx b/packages/web/src/content/docs/agents.mdx
index 7016d6576..e15ba6cb1 100644
--- a/packages/web/src/content/docs/agents.mdx
+++ b/packages/web/src/content/docs/agents.mdx
@@ -303,27 +303,33 @@ Use the `model` config to override the default model for this agent. Useful for
Control which tools are available in this agent with the `tools` config. You can enable or disable specific tools by setting them to `true` or `false`.
-```json title="opencode.json"
+```json title="opencode.json" {3-6,9-12}
{
+ "$schema": "https://opencode.ai/config.json",
+ "tools": {
+ "write": true,
+ "bash": true
+ },
"agent": {
- "readonly": {
+ "plan": {
"tools": {
"write": false,
- "edit": false,
- "bash": false,
- "read": true,
- "grep": true,
- "glob": true
+ "bash": false
}
}
}
}
```
+:::note
+The agent-specific config overrides the global config.
+:::
+
You can also use wildcards to control multiple tools at once. For example, to disable all tools from an MCP server:
```json title="opencode.json"
{
+ "$schema": "https://opencode.ai/config.json",
"agent": {
"readonly": {
"tools": {
@@ -336,27 +342,7 @@ You can also use wildcards to control multiple tools at once. For example, to di
}
```
-If no tools are specified, all tools are enabled by default.
-
----
-
-#### Available tools
-
-Here are all the tools can be controlled through the agent config.
-
-| Tool | Description |
-| ----------- | ----------------------- |
-| `bash` | Execute shell commands |
-| `edit` | Modify existing files |
-| `write` | Create new files |
-| `read` | Read file contents |
-| `grep` | Search file contents |
-| `glob` | Find files by pattern |
-| `list` | List directory contents |
-| `patch` | Apply patches to files |
-| `todowrite` | Manage todo lists |
-| `todoread` | Read todo lists |
-| `webfetch` | Fetch web content |
+[Learn more about tools](/docs/tools).
---
diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx
index d996cb94b..f3b2a05a0 100644
--- a/packages/web/src/content/docs/config.mdx
+++ b/packages/web/src/content/docs/config.mdx
@@ -86,6 +86,24 @@ You can configure TUI-specific settings through the `tui` option.
---
+### Tools
+
+You can manage the tools an LLM can use through the `tools` option.
+
+```json title="opencode.json"
+{
+ "$schema": "https://opencode.ai/config.json",
+ "tools": {
+ "write": false,
+ "bash": false
+ }
+}
+```
+
+[Learn more about tools here](/docs/tools).
+
+---
+
### Models
You can configure the providers and models you want to use in your OpenCode config through the `provider`, `model` and `small_model` options.
diff --git a/packages/web/src/content/docs/custom-tools.mdx b/packages/web/src/content/docs/custom-tools.mdx
index d982475ef..3f4cf06bc 100644
--- a/packages/web/src/content/docs/custom-tools.mdx
+++ b/packages/web/src/content/docs/custom-tools.mdx
@@ -3,7 +3,7 @@ title: Custom Tools
description: Create tools the LLM can call in opencode.
---
-Custom tools are functions you create that the LLM can call during conversations. They work alongside opencode's built-in tools like `read`, `write`, and `bash`.
+Custom tools are functions you create that the LLM can call during conversations. They work alongside opencode's [built-in tools](/docs/tools) like `read`, `write`, and `bash`.
---
diff --git a/packages/web/src/content/docs/tools.mdx b/packages/web/src/content/docs/tools.mdx
index f323ac109..11761d4c8 100644
--- a/packages/web/src/content/docs/tools.mdx
+++ b/packages/web/src/content/docs/tools.mdx
@@ -303,7 +303,7 @@ Internally, tools like `grep`, `glob`, and `list` use [ripgrep](https://github.c
---
-### Override ignore patterns
+### Ignore patterns
To include files that would normally be ignored, create a `.ignore` file in your project root. This file can explicitly allow certain paths.
@@ -314,5 +314,3 @@ To include files that would normally be ignored, create a `.ignore` file in your
```
For example, this `.ignore` file allows ripgrep to search within `node_modules/`, `dist/`, and `build/` directories even if they're listed in `.gitignore`.
-
-The `.ignore` file follows ripgrep's ignore file syntax. Patterns prefixed with `!` negate the ignore rules from `.gitignore`.
diff --git a/packages/web/src/content/docs/zen.mdx b/packages/web/src/content/docs/zen.mdx
index 6bbe34a84..f1c2b3338 100644
--- a/packages/web/src/content/docs/zen.mdx
+++ b/packages/web/src/content/docs/zen.mdx
@@ -66,6 +66,7 @@ You can also access our models through the following API endpoints.
| ---------------- | ---------------- | --------------------------------------------- | --------------------------- |
| GPT 5 | gpt-5 | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` |
| GPT 5 Codex | gpt-5-codex | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` |
+| Claude Sonnet 4.5 | claude-sonnet-4-5 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
| Claude Sonnet 4 | claude-sonnet-4 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
| Claude Haiku 3.5 | claude-3-5-haiku | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |
| Claude Opus 4.1 | claude-opus-4-1 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` |