Skip to content

Commit ed5644b

Browse files
author
CodeBuddy Attribution Bot
committed
fix(attribution): all-in-one skill 未区分 CLI 与 MCP 使用场景,导致 CLI 禁用时误用 (issue_mo8z9w2j_u59a3i)
1 parent e2ca73f commit ed5644b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

config/source/skills/cloud-functions/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ Use these rules whenever you are writing the function code itself:
118118
3. **Write code and deploy, do not stop at local files**
119119
- Use `manageFunctions(action="createFunction")` for creation
120120
- Use `manageFunctions(action="updateFunctionCode")` for code updates
121+
- Use `manageFunctions(action="updateFunctionConfig")` for config updates (timeout, memorySize, envVariables)
121122
- Keep `functionRootPath` as the directory that directly contains function folders (e.g., `cloudfunctions/` or `functions/`), NOT the project root and NOT the function subdirectory itself
122-
- Use CLI only as a fallback when MCP tools are unavailable
123+
- **Prefer MCP tools over CLI** — when MCP tools are available, use `manageFunctions` and `queryFunctions` instead of CLI commands
124+
- **Do NOT use CLI when it is explicitly disabled** — if the runtime indicates CLI is unavailable, use MCP tools exclusively
125+
- For batch updates (multiple functions), call `manageFunctions(action="updateFunctionConfig")` individually for each function — MCP does not have a `--all` batch parameter like CLI
123126

124127
4. **Prefer doc-first fallbacks**
125128
- If a task falls back to `callCloudApi`, first check the official docs or knowledge-base entry for that action

config/source/skills/cloud-functions/references/operations-and-config.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,16 @@ Prefer the converged entrances below, but translate historical names when they a
156156

157157
## CLI fallback
158158

159-
Use CLI only when MCP tools are unavailable.
159+
Use CLI **only** when MCP tools are unavailable AND CLI is explicitly enabled in the runtime environment.
160160

161161
- `tcb fn deploy <name>` -> Event Function
162162
- `tcb fn deploy <name> --httpFn` -> HTTP Function
163163
- `tcb fn deploy <name> --httpFn --ws` -> HTTP Function with WebSocket
164164
- `tcb fn deploy --all` -> Deploy all functions
165+
- `tcb fn config update <name>` -> Update function config (timeout, memorySize, envVariables)
166+
167+
**Important:** When the runtime indicates CLI is disabled (e.g., `tcbCliEnabled: false`), use MCP tools exclusively. Do not attempt CLI commands in such environments.
168+
169+
**Batch updates via MCP:** MCP does not have a `--all` batch parameter. To update multiple functions, call `manageFunctions(action="updateFunctionConfig")` individually for each function.
165170

166171
In non-interactive agent runs, do not default to CLI login or interactive setup flows.

0 commit comments

Comments
 (0)