Skip to content

Commit f96b545

Browse files
authored
docs: describe tools exposed directly when execute is denied (#63566)
1 parent 33aefad commit f96b545

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎services/site/src/docs/content/mcp-servers.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ When a server returns instructions during initialization, OpenCode adds them to
481481

482482
For servers that use Code Mode, OpenCode adds a line that says where the agent can find the server's tools.
483483

484-
A server's instructions are omitted when the agent's permissions deny every one of its tools, or when they deny `execute` for a server that uses Code Mode.
484+
A server's instructions are omitted when the agent's permissions deny every one of its tools. When they deny `execute`, the server's tools are listed directly and its instructions are kept without the Code Mode line.
485485

486486
## Input requests
487487

‎services/site/src/docs/content/permissions.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ currently use these actions and resources:
123123
| `<server>_<tool>` | `*` for an MCP tool; unsupported characters in both names become `_` |
124124
| `opencode_list_mcp_resources` | MCP server name |
125125
| `opencode_read_mcp_resource` | `<server>:<uri>` |
126-
| `execute` | `*`; a deny removes Code Mode and the tools reached only through it, while nested tools enforce their rules |
126+
| `execute` | `*`; a deny removes Code Mode and lists its tools directly, while nested tools enforce their rules |
127127

128128
For example, allow one skill and deny all other skills:
129129

‎services/site/src/docs/content/tools.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ Read package.json and README.md in parallel, then return their relevant setup de
236236

237237
The runtime has no direct filesystem access, imports, or timers. It provides
238238
`fetch` for HTTP requests; everything else goes through tools in its catalog.
239-
Denying `execute` with resource `*` removes Code Mode and every tool reached only
240-
through it, including MCP tools from servers that do not set `codemode: false`.
239+
Denying `execute` with resource `*` removes Code Mode. The tools it would reach,
240+
including MCP tools from servers that do not set `codemode: false`, are then
241+
listed as direct tools, each with its full definition in every request. Deny
242+
those tools too if the agent should not have them.
241243
Nested built-in and MCP tools still enforce their own permissions, and plugin
242244
tools enforce the permissions they assert.
243245

0 commit comments

Comments
 (0)