Runbook: ScaffoldServiceHighRate / McpToolErrorRateHigh¶
Alert: ScaffoldServiceHighRate or McpToolErrorRateHigh
Severity: Warning
Category: ai-ops
ScaffoldServiceHighRate — possible agent loop¶
What is happening¶
scaffold_service has been called more than 5 times in 10 minutes. Normal usage is 0–2
calls per developer session. A high rate suggests a runaway agent loop or an API key being
used to bulk-create services automatically.
Triage¶
1 2 3 4 5 6 7 8 9 10 11 12 | |
Remediation¶
- Identify the agent from the audit log — look for the
agentfield. - Check created repos in GitHub —
gh repo list <org> --limit 20 --json name,createdAt. - Delete spurious repos if created accidentally:
1gh repo delete <org>/<repo-name> --yes - Restart the KAgent controller to clear stale agent sessions:
1kubectl rollout restart deployment/kagent-controller -n kagent
McpToolErrorRateHigh — tool call error spike¶
What is happening¶
More than 50 % of recent MCP tool calls on a given server/tool are returning errors.
Triage¶
1 2 3 4 5 6 7 8 | |
Common causes¶
| Symptom | Cause | Fix |
|---|---|---|
Backstage API error 401 |
BACKSTAGE_TOKEN expired |
Rotate token in backstage-catalog-exporter-token secret |
K8s API error 403 |
ServiceAccount RBAC gap | Check kubernetes/rbac/ + re-apply |
Prometheus error 503 |
Prometheus pod OOM restarted | kubectl rollout restart deployment/prometheus-k8s -n monitoring |
fetch_service_contract timeout |
Target service not reachable from MCP pod | Verify network policy + service DNS |