Sibling skills (local only)
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Activation Contract
Use this first when
- The user wants to check the health or status of CloudBase resources (cloud functions, CloudRun, databases, storage, etc.).
- The user reports errors, failures, or abnormal behavior and wants a quick diagnosis.
- The user asks for an "inspection", "health check", "巡检", "诊断", or "troubleshooting" of their CloudBase environment.
- The user wants to review recent error logs across services.
- The user asks 告警解读 questions: whether a CPU 告警 is normal, what 峰值 QPS was, or whether throttle/error metrics look healthy.
- The symptom matches a v3 fault playbook: 429 / 限频, 云函数 404, ACCESS_TOKEN_INVALID, or 调用量为 0.
Read before writing code if
- The inspection reveals code-level issues in cloud functions or CloudRun services — then read the relevant implementation skill before suggesting fixes.
- The user wants to fix a problem found during inspection rather than just diagnose it.
Then also read
- Alarm interpretation baselines ->
references/alarm-interpretation.md
- Fault playbooks (429 / 404 / token / zero calls) ->
references/fault-playbooks.md
- Cloud function issues ->
../cloud-functions/SKILL.md
- CloudRun issues ->
../cloudrun-development/SKILL.md
- Database issues ->
../postgresql-development-cloudbase/SKILL.md for CloudBase PG / PostgreSQL, ../relational-database-mcp-cloudbase/SKILL.md for MySQL, or ../cloudbase-document-database-web-sdk/SKILL.md for NoSQL
- Auth readiness (token failures) ->
../auth-tool-cloudbase/SKILL.md
- Platform overview ->
../cloudbase-platform/SKILL.md
Do NOT use for
- Deploying new resources or writing application code. This skill is read-only and diagnostic.
- Replacing proper monitoring/alerting infrastructure. It provides point-in-time inspection, not continuous monitoring.
- Directly fixing problems — it diagnoses and recommends; actual fixes should use the appropriate implementation skill.
- Fetching metrics by guessing cloud API Actions. Never use
callCloudApi for monitor curves — always use queryEnv(action="metrics").
Common mistakes / gotchas
- Running a full inspection without first confirming the environment is bound (
auth tool must show logged-in and env-bound state).
- Ignoring CLS log service status — if CLS is not enabled,
queryLogs will fail; always check first with queryLogs(action="checkLogService").
- Searching logs without a time range — this can return excessive or irrelevant results. Always scope searches to a relevant time window.
- Treating a single error log as the root cause without correlating across resources. A function error may stem from a database or config issue.
- Answering "峰值 QPS" / "CPU 告警是否正常" from screenshots or memory instead of
queryEnv(action="metrics").
- Calling
callCloudApi with invented GetMonitorData / DescribeCurveData parameters — the metrics branch already wraps Manager SDK.
Minimal checklist
How to use this skill (for a coding agent)
Ops Inspector v3 additions
v3 adds two mandatory capabilities on top of log/resource inspection:
- 告警解读 — pull metrics, compare to baselines in
references/alarm-interpretation.md, answer CPU-alert / peak-QPS style questions in plain language.
- 故障剧本 — when symptoms match, follow
references/fault-playbooks.md instead of ad-hoc tool fishing.
Inspection Modes
| Mode |
When to use |
Scope |
| Full inspection |
User asks for a general health check / 巡检 / 全面检查 |
All resource types + core metrics |
| Targeted inspection |
User reports a specific error or asks about a specific resource |
One resource type or playbook |
| Alarm interpretation |
User asks CPU 告警是否正常 / 峰值 QPS / 是否限流 |
Metrics-first, then logs |
| Fault playbook |
429 / function 404 / ACCESS_TOKEN_INVALID / 调用量为 0 |
Playbook steps only |
Full Inspection Workflow
Follow these steps in order for a comprehensive environment health check:
Step 1 — Environment Check
envQuery(action="info")
Confirm the environment is accessible. Record the envId for console link generation.
Step 2 — Metrics snapshot (v3)
queryEnv(action="metrics", envId="<EnvId>", metricName="GatewayTraceEnvQPS")
queryEnv(action="metrics", envId="<EnvId>", metricName="FunctionInvocation")
queryEnv(action="metrics", envId="<EnvId>", metricName="MysqlCpuUsageRate")
Use returned Summary.max / avg / allZero / peakTimestamp. Add FunctionError, FunctionThrottle, or CloudRun Tke* metrics when those resources exist. Read references/alarm-interpretation.md before concluding.
Step 3 — Log Service Status
queryLogs(action="checkLogService")
If CLS is not enabled, note this as a warning — log-based diagnosis will be unavailable. Recommend enabling CLS in the console: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
Step 4 — Cloud Functions Inspection
queryFunctions(action="listFunctions")
For each function, check:
- Status: Is the function in an active/deployed state?
- Recent errors:
queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<recent>")
- Common issues:
- Timeout errors (execution exceeded limit)
- Memory limit exceeded
- Runtime errors (unhandled exceptions)
- Cold start frequency
- Zero invocations while traffic is expected → Playbook 4
Step 5 — CloudRun Services Inspection
queryCloudRun(action="list")
For each service, check:
- Status: Is the service running?
- Detail:
queryCloudRun(action="detail", detailServerName="<name>")
- Metrics:
queryEnv(action="metrics", metricName="TkeQPSService", resourceID="<serviceName>") (resourceID required)
- Common issues:
- Service not running (scaled to zero or crashed)
- Image pull failures
- OOMKilled events
- Health check failures
Step 6 — Error Log Aggregation (if CLS is enabled)
queryLogs(action="searchLogs", queryString="ERROR", service="tcb", startTime="<24h-ago>", limit=50)
queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", startTime="<24h-ago>", limit=50)
Look for patterns:
- Repeated error messages (same error many times)
- Cascading failures (errors in multiple services around the same time)
- Timeout / 429 / 404 / ACCESS_TOKEN_INVALID patterns → jump to the matching playbook
Step 7 — Summary Report
Generate a structured report:
# CloudBase Resource Inspection Report
**Environment**: ${envId}
**Inspection Time**: ${timestamp}
## Overall Health: ✅ Healthy / ⚠️ Warnings Found / ❌ Issues Found
## 告警解读
| 问题 | 指标 | 窗口峰值 | 基线 | 结论 |
|------|------|----------|------|------|
| 峰值 QPS | GatewayTraceEnvQPS | ... | package default 500 unless known | ... |
| CPU 告警是否正常 | MysqlCpuUsageRate | ... | warn≥80 / crit≥90 | ... |
### Cloud Functions
| Function | Status | Recent Errors | Invocations | Severity |
|----------|--------|---------------|-------------|----------|
| ... | ... | ... | ... | ... |
### CloudRun Services
| Service | Status | Issues | Severity |
|---------|--------|--------|----------|
| ... | ... | ... | ... |
### Error Log Summary
- Total errors in last 24h: N
- Top error patterns: ...
## Recommendations
1. ...
2. ...
## Console Links
- Cloud Functions: https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
- CloudRun: https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run
- Logs: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
- Monitor: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops
Targeted Inspection Workflow
When the user specifies a resource type or a specific resource:
- Cloud function errors:
queryFunctions(action="listFunctionLogs", functionName="<name>") then queryLogs(action="searchLogs", queryString="* AND functionName:<name> AND level:ERROR", ...)
- CloudRun errors:
queryCloudRun(action="detail", detailServerName="<name>") then queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", ...)
- If logs show DB / Redis connection failures (
ECONNREFUSED, timeout, "could not connect"): check whether VpcConf is set and matches the database VPC. See cloudrun-development/references/vpc-and-database.md.
- Database issues: Check
queryPgDatabase(action="context"|"metadata"|"objects") for CloudBase PG, queryMysqlDatabase for MySQL, or readNoSqlDatabaseStructure for NoSQL depending on type; for CPU/disk alerts also pull MysqlCpuUsageRate / MysqlStorageUsage metrics
- General error search:
queryLogs(action="searchLogs", queryString="<error-keyword>", ...)
- Alarm / QPS questions: follow
references/alarm-interpretation.md
- 429 / function 404 / ACCESS_TOKEN_INVALID / 调用量为 0: follow
references/fault-playbooks.md
AIOps Methodology
This skill follows AIOps principles for intelligent inspection:
- Data Collection: Gather metrics (
queryEnv metrics), logs, and resource states via MCP tools — never via ad-hoc callCloudApi
- Pattern Recognition: Identify recurring errors, anomaly patterns, and correlations across services
- Baseline Comparison: Compare metric
Summary values to skill baselines (告警解读)
- Root Cause Hypothesis: Based on error patterns + metrics, suggest likely root causes
- Actionable Recommendations: Provide specific, prioritized remediation steps with links to relevant skills and console pages
Severity Levels
| Level |
Icon |
Meaning |
| Critical |
❌ |
Service is down or data is at risk; requires immediate action |
| Warning |
⚠️ |
Errors detected but service is still partially functional; investigate soon |
| Info |
ℹ️ |
No errors found; informational status only |
| Healthy |
✅ |
Resource is operating normally |
Preferred Tool Map
| Operation |
MCP Tool Call |
| Check environment |
envQuery(action="info") |
| Query metrics (QPS/CPU/invocations) |
queryEnv(action="metrics", envId, metricName="...") |
| Check CLS status |
queryLogs(action="checkLogService") |
| List cloud functions |
queryFunctions(action="listFunctions") |
| Get function detail |
queryFunctions(action="getFunctionDetail", functionName="<name>") |
| Get function logs |
queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<time>", endTime="<time>") |
| Get function log detail |
queryFunctions(action="getFunctionLogDetail", requestId="<id>") |
| List CloudRun services |
queryCloudRun(action="list") |
| Get CloudRun detail |
queryCloudRun(action="detail", detailServerName="<name>") |
| Search CLS logs |
queryLogs(action="searchLogs", queryString="<query>", service="tcb|tcbr", startTime="<time>", endTime="<time>") |
| Check NoSQL structure |
readNoSqlDatabaseStructure(action="listCollections") |
| Check PostgreSQL context |
queryPgDatabase(action="context") |
| Check PostgreSQL metadata |
queryPgDatabase(action="metadata", limit=20) |
| Check MySQL status |
queryMysqlDatabase(action="getContext") |
| Auth provider readiness |
queryAppAuth / auth-tool skill (for ACCESS_TOKEN_INVALID) |
Common CLS Query Patterns
| Scenario |
queryString |
| All errors |
ERROR |
| Function timeout |
timeout OR 超时 |
| Function OOM |
OOM OR out of memory OR 内存超限 |
| CloudRun crash |
crash OR OOMKilled OR Error |
| Specific function errors |
functionName:<name> AND level:ERROR |
| 5xx HTTP errors |
statusCode:>499 |
| 429 / throttle |
429 OR throttle OR 限流 OR FREQUENCY |
| Function 404 |
404 OR FUNCTION_NOT_FOUND |
| Token invalid |
ACCESS_TOKEN_INVALID OR token invalid |
| Cold start issues |
coldStart OR 冷启动 |
Time Range Guidance
- Quick check: Last 1 hour (
startTime = 1 hour ago)
- Standard inspection: Last 24 hours
- Trend analysis: Last 7 days
- Specific incident: Narrow to the reported time window
Always use ISO-like YYYY-MM-DD HH:mm:ss for metrics startTime/endTime, e.g., "2026-08-17 00:00:00".
Related Skills
cloud-functions — Cloud function development, deployment, and debugging
cloudrun-development — CloudRun backend deployment and management
cloudbase-platform — General platform knowledge and console navigation
postgresql-development-cloudbase — CloudBase PostgreSQL / PG diagnostics and schema/RLS checks
relational-database-mcp-cloudbase — MySQL database management and diagnostics
auth-tool-cloudbase — Auth provider readiness for token failures
1---
2name: ops-inspector
3description: AIOps-style CloudBase inspection skill (v3). Use when users need health checks, log diagnosis, alarm interpretation (CPU alert normal?, peak QPS), metrics via queryEnv(action=metrics), or fault playbooks for 429 / function 404 / ACCESS_TOKEN_INVALID / zero invocations. Triggers on 巡检, 诊断, 告警, 峰值 QPS, 限频, 调用量为 0, troubleshooting.
4version: 2.33.2
5alwaysApply: false
6---
7
8## Sibling skills (local only)
9
10Sibling CloudBase skills ship beside this skill. Use local relative paths such as `../auth-tool-cloudbase/SKILL.md`.
11
12If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.
13
14## Activation Contract
15
16### Use this first when
17
18- The user wants to check the health or status of CloudBase resources (cloud functions, CloudRun, databases, storage, etc.).
19- The user reports errors, failures, or abnormal behavior and wants a quick diagnosis.
20- The user asks for an "inspection", "health check", "巡检", "诊断", or "troubleshooting" of their CloudBase environment.
21- The user wants to review recent error logs across services.
22- The user asks **告警解读** questions: whether a **CPU 告警** is normal, what **峰值 QPS** was, or whether throttle/error metrics look healthy.
23- The symptom matches a v3 fault playbook: **429 / 限频**, **云函数 404**, **ACCESS_TOKEN_INVALID**, or **调用量为 0**.
24
25### Read before writing code if
26
27- The inspection reveals code-level issues in cloud functions or CloudRun services — then read the relevant implementation skill before suggesting fixes.
28- The user wants to fix a problem found during inspection rather than just diagnose it.
29
30### Then also read
31
32- Alarm interpretation baselines -> `references/alarm-interpretation.md`
33- Fault playbooks (429 / 404 / token / zero calls) -> `references/fault-playbooks.md`
34- Cloud function issues -> `../cloud-functions/SKILL.md`
35- CloudRun issues -> `../cloudrun-development/SKILL.md`
36- Database issues -> `../postgresql-development-cloudbase/SKILL.md` for CloudBase PG / PostgreSQL, `../relational-database-mcp-cloudbase/SKILL.md` for MySQL, or `../cloudbase-document-database-web-sdk/SKILL.md` for NoSQL
37- Auth readiness (token failures) -> `../auth-tool-cloudbase/SKILL.md`
38- Platform overview -> `../cloudbase-platform/SKILL.md`
39
40### Do NOT use for
41
42- Deploying new resources or writing application code. This skill is read-only and diagnostic.
43- Replacing proper monitoring/alerting infrastructure. It provides point-in-time inspection, not continuous monitoring.
44- Directly fixing problems — it diagnoses and recommends; actual fixes should use the appropriate implementation skill.
45- Fetching metrics by guessing cloud API Actions. **Never** use `callCloudApi` for monitor curves — always use `queryEnv(action="metrics")`.
46
47### Common mistakes / gotchas
48
49- Running a full inspection without first confirming the environment is bound (`auth` tool must show logged-in and env-bound state).
50- Ignoring CLS log service status — if CLS is not enabled, `queryLogs` will fail; always check first with `queryLogs(action="checkLogService")`.
51- Searching logs without a time range — this can return excessive or irrelevant results. Always scope searches to a relevant time window.
52- Treating a single error log as the root cause without correlating across resources. A function error may stem from a database or config issue.
53- Answering "峰值 QPS" / "CPU 告警是否正常" from screenshots or memory instead of `queryEnv(action="metrics")`.
54- Calling `callCloudApi` with invented `GetMonitorData` / `DescribeCurveData` parameters — the metrics branch already wraps Manager SDK.
55
56### Minimal checklist
57
58- [ ] Environment is bound and accessible (`envQuery(action="info")`)
59- [ ] Metrics pulled with `queryEnv(action="metrics")` when the question involves QPS / CPU / throttle / invocation volume
60- [ ] CLS log service is enabled (`queryLogs(action="checkLogService")`) when log diagnosis is needed
61- [ ] Matching fault playbook selected when symptoms match 429 / function 404 / ACCESS_TOKEN_INVALID / 调用量为 0
62- [ ] Time range is specified for any log or metrics searches
63- [ ] Findings are summarized with severity levels, **告警解读**, and actionable recommendations
64
65---
66
67## How to use this skill (for a coding agent)
68
69### Ops Inspector v3 additions
70
71v3 adds two mandatory capabilities on top of log/resource inspection:
72
731. **告警解读** — pull metrics, compare to baselines in `references/alarm-interpretation.md`, answer CPU-alert / peak-QPS style questions in plain language.
742. **故障剧本** — when symptoms match, follow `references/fault-playbooks.md` instead of ad-hoc tool fishing.
75
76### Inspection Modes
77
78| Mode | When to use | Scope |
79|------|-------------|-------|
80| **Full inspection** | User asks for a general health check / 巡检 / 全面检查 | All resource types + core metrics |
81| **Targeted inspection** | User reports a specific error or asks about a specific resource | One resource type or playbook |
82| **Alarm interpretation** | User asks CPU 告警是否正常 / 峰值 QPS / 是否限流 | Metrics-first, then logs |
83| **Fault playbook** | 429 / function 404 / ACCESS_TOKEN_INVALID / 调用量为 0 | Playbook steps only |
84
85### Full Inspection Workflow
86
87Follow these steps in order for a comprehensive environment health check:
88
89**Step 1 — Environment Check**
90
91```
92envQuery(action="info")
93```
94
95Confirm the environment is accessible. Record the `envId` for console link generation.
96
97**Step 2 — Metrics snapshot (v3)**
98
99```
100queryEnv(action="metrics", envId="<EnvId>", metricName="GatewayTraceEnvQPS")
101queryEnv(action="metrics", envId="<EnvId>", metricName="FunctionInvocation")
102queryEnv(action="metrics", envId="<EnvId>", metricName="MysqlCpuUsageRate")
103```
104
105Use returned `Summary.max` / `avg` / `allZero` / `peakTimestamp`. Add `FunctionError`, `FunctionThrottle`, or CloudRun `Tke*` metrics when those resources exist. Read `references/alarm-interpretation.md` before concluding.
106
107**Step 3 — Log Service Status**
108
109```
110queryLogs(action="checkLogService")
111```
112
113If CLS is not enabled, note this as a **warning** — log-based diagnosis will be unavailable. Recommend enabling CLS in the console: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log`
114
115**Step 4 — Cloud Functions Inspection**
116
117```
118queryFunctions(action="listFunctions")
119```
120
121For each function, check:
122- **Status**: Is the function in an active/deployed state?
123- **Recent errors**: `queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<recent>")`
124- **Common issues**:
125 - Timeout errors (execution exceeded limit)
126 - Memory limit exceeded
127 - Runtime errors (unhandled exceptions)
128 - Cold start frequency
129 - Zero invocations while traffic is expected → Playbook 4
130
131**Step 5 — CloudRun Services Inspection**
132
133```
134queryCloudRun(action="list")
135```
136
137For each service, check:
138- **Status**: Is the service running?
139- **Detail**: `queryCloudRun(action="detail", detailServerName="<name>")`
140- **Metrics**: `queryEnv(action="metrics", metricName="TkeQPSService", resourceID="<serviceName>")` (resourceID required)
141- **Common issues**:
142 - Service not running (scaled to zero or crashed)
143 - Image pull failures
144 - OOMKilled events
145 - Health check failures
146
147**Step 6 — Error Log Aggregation** (if CLS is enabled)
148
149```
150queryLogs(action="searchLogs", queryString="ERROR", service="tcb", startTime="<24h-ago>", limit=50)
151queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", startTime="<24h-ago>", limit=50)
152```
153
154Look for patterns:
155- Repeated error messages (same error many times)
156- Cascading failures (errors in multiple services around the same time)
157- Timeout / 429 / 404 / ACCESS_TOKEN_INVALID patterns → jump to the matching playbook
158
159**Step 7 — Summary Report**
160
161Generate a structured report:
162
163```markdown
164# CloudBase Resource Inspection Report
165
166**Environment**: ${envId}
167**Inspection Time**: ${timestamp}
168
169## Overall Health: ✅ Healthy / ⚠️ Warnings Found / ❌ Issues Found
170
171## 告警解读
172| 问题 | 指标 | 窗口峰值 | 基线 | 结论 |
173|------|------|----------|------|------|
174| 峰值 QPS | GatewayTraceEnvQPS | ... | package default 500 unless known | ... |
175| CPU 告警是否正常 | MysqlCpuUsageRate | ... | warn≥80 / crit≥90 | ... |
176
177### Cloud Functions
178| Function | Status | Recent Errors | Invocations | Severity |
179|----------|--------|---------------|-------------|----------|
180| ... | ... | ... | ... | ... |
181
182### CloudRun Services
183| Service | Status | Issues | Severity |
184|---------|--------|--------|----------|
185| ... | ... | ... | ... |
186
187### Error Log Summary
188- Total errors in last 24h: N
189- Top error patterns: ...
190
191## Recommendations
1921. ...
1932. ...
194
195## Console Links
196- Cloud Functions: https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
197- CloudRun: https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run
198- Logs: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
199- Monitor: https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops
200```
201
202### Targeted Inspection Workflow
203
204When the user specifies a resource type or a specific resource:
205
2061. **Cloud function errors**: `queryFunctions(action="listFunctionLogs", functionName="<name>")` then `queryLogs(action="searchLogs", queryString="* AND functionName:<name> AND level:ERROR", ...)`
2072. **CloudRun errors**: `queryCloudRun(action="detail", detailServerName="<name>")` then `queryLogs(action="searchLogs", queryString="ERROR", service="tcbr", ...)`
208 - If logs show DB / Redis connection failures (`ECONNREFUSED`, timeout, "could not connect"): check whether `VpcConf` is set and matches the database VPC. See `cloudrun-development/references/vpc-and-database.md`.
2093. **Database issues**: Check `queryPgDatabase(action="context"|"metadata"|"objects")` for CloudBase PG, `queryMysqlDatabase` for MySQL, or `readNoSqlDatabaseStructure` for NoSQL depending on type; for CPU/disk alerts also pull `MysqlCpuUsageRate` / `MysqlStorageUsage` metrics
2104. **General error search**: `queryLogs(action="searchLogs", queryString="<error-keyword>", ...)`
2115. **Alarm / QPS questions**: follow `references/alarm-interpretation.md`
2126. **429 / function 404 / ACCESS_TOKEN_INVALID / 调用量为 0**: follow `references/fault-playbooks.md`
213
214### AIOps Methodology
215
216This skill follows AIOps principles for intelligent inspection:
217
2181. **Data Collection**: Gather metrics (`queryEnv` metrics), logs, and resource states via MCP tools — never via ad-hoc `callCloudApi`
2192. **Pattern Recognition**: Identify recurring errors, anomaly patterns, and correlations across services
2203. **Baseline Comparison**: Compare metric `Summary` values to skill baselines (告警解读)
2214. **Root Cause Hypothesis**: Based on error patterns + metrics, suggest likely root causes
2225. **Actionable Recommendations**: Provide specific, prioritized remediation steps with links to relevant skills and console pages
223
224### Severity Levels
225
226| Level | Icon | Meaning |
227|-------|------|---------|
228| Critical | ❌ | Service is down or data is at risk; requires immediate action |
229| Warning | ⚠️ | Errors detected but service is still partially functional; investigate soon |
230| Info | ℹ️ | No errors found; informational status only |
231| Healthy | ✅ | Resource is operating normally |
232
233### Preferred Tool Map
234
235| Operation | MCP Tool Call |
236|-----------|---------------|
237| Check environment | `envQuery(action="info")` |
238| Query metrics (QPS/CPU/invocations) | `queryEnv(action="metrics", envId, metricName="...")` |
239| Check CLS status | `queryLogs(action="checkLogService")` |
240| List cloud functions | `queryFunctions(action="listFunctions")` |
241| Get function detail | `queryFunctions(action="getFunctionDetail", functionName="<name>")` |
242| Get function logs | `queryFunctions(action="listFunctionLogs", functionName="<name>", startTime="<time>", endTime="<time>")` |
243| Get function log detail | `queryFunctions(action="getFunctionLogDetail", requestId="<id>")` |
244| List CloudRun services | `queryCloudRun(action="list")` |
245| Get CloudRun detail | `queryCloudRun(action="detail", detailServerName="<name>")` |
246| Search CLS logs | `queryLogs(action="searchLogs", queryString="<query>", service="tcb\|tcbr", startTime="<time>", endTime="<time>")` |
247| Check NoSQL structure | `readNoSqlDatabaseStructure(action="listCollections")` |
248| Check PostgreSQL context | `queryPgDatabase(action="context")` |
249| Check PostgreSQL metadata | `queryPgDatabase(action="metadata", limit=20)` |
250| Check MySQL status | `queryMysqlDatabase(action="getContext")` |
251| Auth provider readiness | `queryAppAuth` / auth-tool skill (for ACCESS_TOKEN_INVALID) |
252
253### Common CLS Query Patterns
254
255| Scenario | queryString |
256|----------|-------------|
257| All errors | `ERROR` |
258| Function timeout | `timeout OR 超时` |
259| Function OOM | `OOM OR out of memory OR 内存超限` |
260| CloudRun crash | `crash OR OOMKilled OR Error` |
261| Specific function errors | `functionName:<name> AND level:ERROR` |
262| 5xx HTTP errors | `statusCode:>499` |
263| 429 / throttle | `429 OR throttle OR 限流 OR FREQUENCY` |
264| Function 404 | `404 OR FUNCTION_NOT_FOUND` |
265| Token invalid | `ACCESS_TOKEN_INVALID OR token invalid` |
266| Cold start issues | `coldStart OR 冷启动` |
267
268### Time Range Guidance
269
270- **Quick check**: Last 1 hour (`startTime` = 1 hour ago)
271- **Standard inspection**: Last 24 hours
272- **Trend analysis**: Last 7 days
273- **Specific incident**: Narrow to the reported time window
274
275Always use ISO-like `YYYY-MM-DD HH:mm:ss` for metrics `startTime`/`endTime`, e.g., `"2026-08-17 00:00:00"`.
276
277## Related Skills
278
279- `cloud-functions` — Cloud function development, deployment, and debugging
280- `cloudrun-development` — CloudRun backend deployment and management
281- `cloudbase-platform` — General platform knowledge and console navigation
282- `postgresql-development-cloudbase` — CloudBase PostgreSQL / PG diagnostics and schema/RLS checks
283- `relational-database-mcp-cloudbase` — MySQL database management and diagnostics
284- `auth-tool-cloudbase` — Auth provider readiness for token failures