Skip to main content
Glama
BenedatLLC

Kubernetes Tools MCP Server

by BenedatLLC

get_pod_summaries

Retrieve pod summaries for a namespace or across all namespaces, showing status, readiness, restarts, age, IP, node, and owner to diagnose workloads.

Instructions

Retrieves a list of PodSummary objects for pods in a given namespace or all namespaces.

Parameters
----------
namespace : Optional[str], default=None
    The specific namespace to list pods from. If None, lists pods from all namespaces.

Returns
-------
list of PodSummary
    A list of PodSummary objects, each providing a summary of a pod's status with the following fields:

    name : str
        Name of the pod.
    namespace : str
        Namespace in which the pod is running.
    total_containers : int
        Total number of containers in the pod.
    ready_containers : int
        Number of containers currently in ready state.
    restarts : int
        Total number of restarts for all containers in the pod.
    last_restart : Optional[datetime.timedelta]
        Time since a container of this pod last terminated - the most
        recent last_state.finished_at across its containers - or None if
        none has. For a container waiting in CrashLoopBackOff this is its
        last crash, not a restart: it has not been started again yet. Taken
        from the kubelet's status, so it is current, unlike event records.
    age : datetime.timedelta
        Age of the pod (current time minus creation timestamp).
    ip : Optional[str]
        Pod IP address (None if not assigned).
    node : Optional[str]
        Name of the node where the pod is running (None if not scheduled).
    owner : Optional[str]
        The pod's controlling owner, as "Kind/name" - the object that
        created and manages it, e.g. "DaemonSet/otel-collector-agent",
        "StatefulSet/valkey-cart", "Job/backup-29318400". None for a bare
        pod nobody manages. This is the direct owner only: a Deployment's
        pods are owned by one of its replica sets ("ReplicaSet/ad-7d9f8c6b5"),
        whose `owner_deployment` (`get_replicaset_summaries`) names the
        Deployment; likewise a Job's `owner` names its CronJob. Static
        (mirror) pods such as the control plane's report "Node/<node name>".
        Group pods into workloads by this field rather than by stripping
        name suffixes.
Raises
------
K8sConfigError
    If unable to initialize the K8S API.
K8sApiError
    If the API call to list pods fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.0
    • addedOutput schema / $defs / PodSummary / properties / owner
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Owner"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does substantially: it enumerates the two exception types (K8sConfigError, K8sApiError), warns that last_restart for a CrashLoopBackOff container is the last crash rather than a restart, and notes the value comes from kubelet status so it is current unlike event records. It omits auth/permission requirements and any rate-limit or pagination behavior.

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

Conciseness3/5

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

Front-loaded with the core purpose, but the bulk of the text is a re-documentation of the PodSummary return fields, an output schema already exists. The owner and last_restart explanations earn their place; much of the plain field enumeration does not. Size is disproportionate for a one-parameter read tool.

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

Completeness4/5

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

Given an output schema exists, the description need not restate returns, yet it covers parameter meaning, error conditions, and a subtle data-semantics trap (last_restart on CrashLoopBackOff). What is missing is any permission/context requirement, but overall an agent has enough to call it correctly.

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?

Schema description coverage is 0% and the single parameter has no description in the schema, but the description explicitly defines it: 'The specific namespace to list pods from. If None, lists pods from all namespaces.' That fully compensates for the gap by explaining the null default's meaning.

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?

States a specific verb and resource: 'Retrieves a list of PodSummary objects for pods in a given namespace or all namespaces.' An agent can tell this is a listing/summary tool. It does not explicitly distinguish itself from nearby siblings such as get_pod_container_statuses, get_pod_spec, or get_pod_events, though the field list implicitly differentiates the scope.

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

Usage Guidelines3/5

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

Usage is implied by the description ('list pods from all namespaces') but there is no explicit statement of when to prefer this over get_pod_container_statuses or get_pod_spec. The one genuine routing hint is the cross-reference that a ReplicaSet's owner_deployment can be named via get_replicaset_summaries, which helps group pods into workloads.

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