Explorar o código

docs: fix MCP header interpolation example to {env:VAR} (#31078)

Co-authored-by: wujunchen <wujunchen@baidu.com>
fancivez hai 2 meses
pai
achega
06d7840d1d
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      packages/core/src/plugin/skill/customize-opencode.md

+ 4 - 2
packages/core/src/plugin/skill/customize-opencode.md

@@ -303,7 +303,7 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`,
       "type": "remote",
       "url": "https://...",
       "enabled": true,
-      "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" }
+      "headers": { "Authorization": "Bearer {env:GITHUB_TOKEN}" }
     },
     "old-server": { "enabled": false }
   }
@@ -311,7 +311,9 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`,
 ```
 
 `command` is an array of strings. `type` is required. Use `enabled: false` to
-disable a server inherited from a parent config.
+disable a server inherited from a parent config. String values such as header
+tokens support `{env:VAR}` interpolation (and `{file:path}`); the shell-style
+`${VAR}` is not substituted.
 
 ## Permissions