Skip to main content
Glama
BenedatLLC

Kubernetes Tools MCP Server

by BenedatLLC

get_job_summaries

Lists Kubernetes Job summaries for a namespace or across all namespaces, showing active, succeeded, and failed pod counts, conditions, age, and containers.

Instructions

Retrieves a list of JobSummary objects for Jobs in a given namespace or all namespaces, similar to kubectl get jobs.

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

Returns
-------
list of JobSummary
    A list of JobSummary objects, each with the following fields:

    name : str
        Name of the Job.
    namespace : str
        Namespace of the Job.
    owner : Optional[str]
        Name of the owning CronJob, if this Job was created by one.
    active : int
        Number of actively running pods.
    succeeded : int
        Number of pods that completed successfully.
    failed : int
        Number of pods that terminated in failure.
    start_time : Optional[datetime.timedelta]
        Time since the Job started (None if not started).
    completion_time : Optional[datetime.timedelta]
        Time since the Job completed (None if not complete).
    conditions : list[str]
        Status condition types currently True (e.g. ["Complete"], ["Failed"]).
    age : datetime.timedelta
        Age of the Job (current time minus creation timestamp).
    containers : list[ContainerTemplateSummary]
        The Job pod template's containers, each with name, image, and literal
        environment values.

Raises
------
K8sConfigError
    If unable to initialize the K8S API.
K8sApiError
    If the API call to list Jobs fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers by documenting two failure modes (K8sConfigError, K8sApiError) and a rich return structure. It does not explicitly state read-only safety or auth/permission requirements, but the 'Retrieves a list' framing and error disclosure give strong behavioral context.

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?

The sectioned layout is easy to parse, but the extensive Returns block enumerates every field of JobSummary even though an output schema already exists, which is largely redundant bulk. The parameter and Raises sections earn their place; the return field listing does not.

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?

For a single-parameter read tool, the definition covers the parameter, the return type, and error conditions. Since an output schema exists, the field-level Returns detail is not strictly necessary, but the Raises section adds genuinely useful completeness.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely, and it does: namespace is documented as Optional[str], default=None, and the None case is explicitly defined as 'lists from all namespaces'. That is exactly the semantics an agent needs.

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

Purpose5/5

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

States a specific verb (Retrieves) and resource (JobSummary objects for Jobs), and anchors it with the familiar 'kubectl get jobs' analogy. This clearly separates it from siblings like get_cronjob_summaries and get_logs_for_job.

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?

The kubectl analogy implies the general use case, and the namespace parameter implies scoping, but there is no explicit when-to-use-this-vs-alternatives guidance or statement of exclusions (e.g., versus get_logs_for_job). Usage is implied rather than directed.

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