get_pod_logs
Retrieve container logs from a pod. Use the previous flag to access logs from a crashed instance, aiding in debugging CrashLoopBackOff.
Instructions
Tail a container's logs. Set previous=true to read the prior (crashed) instance's logs — essential for CrashLoopBackOff.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"namespace": "<namespace>",
"name": "<name>"
},
"name": "get_pod_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Pod name. | |
| lines | No | How many lines to tail (default 100). | |
| context | No | Kubeconfig context to target; omit for the server's default context. | |
| previous | No | Read logs from the previous, crashed container instance. | |
| container | No | Container name; required only for multi-container pods. | |
| namespace | Yes | Namespace of the pod. |