Skip to main content
Glama
abhijeetka
by abhijeetka

get_failing_pods

Identify pods with issues in a Kubernetes namespace to diagnose and resolve cluster problems efficiently.

Instructions

Get all pods with issues in the specified namespace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNodefault

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the logic to retrieve failing (non-Running phase) pods using kubectl in the specified namespace.
    @mcp.tool()
    async def get_failing_pods(namespace: str = "default") -> dict:
        """Get all pods with issues in the specified namespace"""
        try:
            cmd = ["kubectl", "get", "pods", "-n", namespace, "--field-selector=status.phase!=Running", "-o", "json"]
            result = subprocess.run(cmd, capture_output=True, text=True, check=True)
            return json.loads(result.stdout)
        except subprocess.CalledProcessError as e:
            return {"error": f"Failed to get pods: {str(e)}"}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral context. It implies a read-only operation but doesn't specify what constitutes 'issues' (e.g., crash loops, readiness failures), whether results are filtered or comprehensive, or any performance/rate limit considerations for a Kubernetes query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every element ('Get', 'pods with issues', 'specified namespace') contributes directly to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a diagnostic tool with no annotations, no output schema, and minimal parameter documentation, the description is insufficient. It doesn't explain what 'issues' means, what data is returned, how results are formatted, or any error conditions—critical gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only one parameter (namespace) and 0% schema description coverage, the description compensates by specifying 'in the specified namespace', clarifying the parameter's role in scoping the query. However, it doesn't explain the default value behavior or namespace format requirements.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'pods with issues', specifying the scope as 'in the specified namespace'. It distinguishes from generic sibling tools like 'get_pods' by focusing on problematic pods, though it doesn't explicitly contrast with other diagnostic tools like 'get_events' or 'describe_pod'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or how it differs from other troubleshooting tools like 'get_events' for error details or 'describe_pod' for individual pod diagnostics.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abhijeetka/mcp-k8s-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server