Diagnose a failing pod
diagnose_podCorrelate Pod JSON, events, logs and manifests to diagnose Kubernetes failures and return root cause, evidence, an exact diff patch and a policy-classified, secret-redacted command plan.
Instructions
Deterministically correlate Pod JSON, Events, container logs and Deployment/Service YAML (plus optional Dockerfile, Secrets metadata, Nodes, Endpoints or docker inspect output) to diagnose OOMKilled, CrashLoopBackOff, ImagePullBackOff, CreateContainerConfigError, Unschedulable and Service port mismatches. Returns the root cause, weighted evidence, an exact unified diff patch and a policy-classified command plan. All secrets are redacted. No LLM, no network.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "diagnose_pod"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | No | kubectl get pod <name> -o json (object or JSON/YAML text) | |
| logs | No | kubectl logs <pod> [--previous] output | |
| nodes | No | kubectl get nodes -o json (for scheduling analysis) | |
| events | No | kubectl get events -o json, an event list, or the plain-text table | |
| format | No | markdown | |
| example | No | Diagnose one of the bundled offline examples. | |
| secrets | No | Secret objects; values are redacted automatically | |
| endpoints | No | kubectl get endpoints <svc> -o json | |
| manifests | No | Workload/Service YAML or JSON (multi-document OK), or {filename: content} | |
| dockerfile | No | Dockerfile content (enables Dockerfile patches) | |
| bundle_path | No | Directory containing pod.json, events.json, logs.txt, *.yaml (must be under KUBEGUARD_MCP_ROOTS) | |
| docker_inspect | No | docker inspect <container> output |