mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 03:56:55 +03:00
docs: describe tools exposed directly when execute is denied (#63566)
This commit is contained in:
committed by
GitHub
Unverified
parent
33aefad13c
commit
f96b54590d
@@ -481,7 +481,7 @@ When a server returns instructions during initialization, OpenCode adds them to
|
||||
|
||||
For servers that use Code Mode, OpenCode adds a line that says where the agent can find the server's tools.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Input requests
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ currently use these actions and resources:
|
||||
| `<server>_<tool>` | `*` for an MCP tool; unsupported characters in both names become `_` |
|
||||
| `opencode_list_mcp_resources` | MCP server name |
|
||||
| `opencode_read_mcp_resource` | `<server>:<uri>` |
|
||||
| `execute` | `*`; a deny removes Code Mode and the tools reached only through it, while nested tools enforce their rules |
|
||||
| `execute` | `*`; a deny removes Code Mode and lists its tools directly, while nested tools enforce their rules |
|
||||
|
||||
For example, allow one skill and deny all other skills:
|
||||
|
||||
|
||||
@@ -236,8 +236,10 @@ Read package.json and README.md in parallel, then return their relevant setup de
|
||||
|
||||
The runtime has no direct filesystem access, imports, or timers. It provides
|
||||
`fetch` for HTTP requests; everything else goes through tools in its catalog.
|
||||
Denying `execute` with resource `*` removes Code Mode and every tool reached only
|
||||
through it, including MCP tools from servers that do not set `codemode: false`.
|
||||
Denying `execute` with resource `*` removes Code Mode. The tools it would reach,
|
||||
including MCP tools from servers that do not set `codemode: false`, are then
|
||||
listed as direct tools, each with its full definition in every request. Deny
|
||||
those tools too if the agent should not have them.
|
||||
Nested built-in and MCP tools still enforce their own permissions, and plugin
|
||||
tools enforce the permissions they assert.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user