Interview Prep/Agentic AI/Tool use & function calling

Write a tool definition for fetching Kubernetes pod status.

IntermediateHands-onTool use & function calling
Answer

Name get_pod_status; description "Returns phase, restart count, last state and recent events for pods matching a label in one namespace. Read-only."; parameters namespace (string, required), label_selector (string, required, e.g. app=web), limit (integer, default 20, max 50). The backend uses a read-only service account and returns compact JSON per pod.

All Agentic AI questions Roadmap: Agentic AI & MCP

More on Tool use & function calling