Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config/source/skills/cloud-functions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ Use these rules whenever you are writing the function code itself:
3. **Write code and deploy, do not stop at local files**
- Use `manageFunctions(action="createFunction")` for creation
- Use `manageFunctions(action="updateFunctionCode")` for code updates
- Use `manageFunctions(action="updateFunctionConfig")` for config updates (timeout, memorySize, envVariables)
- 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
- Use CLI only as a fallback when MCP tools are unavailable
- **Prefer MCP tools over CLI** — when MCP tools are available, use `manageFunctions` and `queryFunctions` instead of CLI commands
- **Do NOT use CLI when it is explicitly disabled** — if the runtime indicates CLI is unavailable, use MCP tools exclusively
- For batch updates (multiple functions), call `manageFunctions(action="updateFunctionConfig")` individually for each function — MCP does not have a `--all` batch parameter like CLI

4. **Prefer doc-first fallbacks**
- If a task falls back to `callCloudApi`, first check the official docs or knowledge-base entry for that action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,16 @@ Prefer the converged entrances below, but translate historical names when they a

## CLI fallback

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

- `tcb fn deploy <name>` -> Event Function
- `tcb fn deploy <name> --httpFn` -> HTTP Function
- `tcb fn deploy <name> --httpFn --ws` -> HTTP Function with WebSocket
- `tcb fn deploy --all` -> Deploy all functions
- `tcb fn config update <name>` -> Update function config (timeout, memorySize, envVariables)

**Important:** When the runtime indicates CLI is disabled (e.g., `tcbCliEnabled: false`), use MCP tools exclusively. Do not attempt CLI commands in such environments.

**Batch updates via MCP:** MCP does not have a `--all` batch parameter. To update multiple functions, call `manageFunctions(action="updateFunctionConfig")` individually for each function.

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