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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_job_summaries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |