describe_pod
Retrieve detailed information about a specific Kubernetes pod, including its configuration, status, and events, to diagnose issues or verify deployment details.
Instructions
Describe a specific pod
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": {
"pod_name": "<pod_name>"
},
"name": "describe_pod"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod_name | Yes | ||
| namespace | No | default |
Implementation Reference
- kubernetes.py:45-53 (handler)The handler function decorated with @mcp.tool() that implements the describe_pod tool by executing the 'kubectl describe pod' command.
@mcp.tool() async def describe_pod(pod_name: str, namespace: str = "default") -> dict: """Describe a specific pod""" try: cmd = ["kubectl", "describe", "pod", pod_name, "-n", namespace] result = subprocess.run(cmd, capture_output=True, text=True, check=True) return {"description": result.stdout} except subprocess.CalledProcessError as e: return {"error": f"Failed to describe pod: {str(e)}"} - kubernetes.py:45-45 (registration)Registers the describe_pod tool using the FastMCP decorator.
@mcp.tool()