list-cronjobs
List scheduled cronjobs in a Kubernetes namespace to monitor automated tasks and job execution schedules.
Instructions
List Kubernetes cronjobs in a namespace
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | The namespace to list cronjobs from (optional, defaults to current context namespace) |
Implementation Reference
- server.js:1479-1487 (handler)Handler function that lists Kubernetes cronjobs using 'kubectl get cronjobs' command in the specified or default namespace.case "list-cronjobs": { const { namespace } = args || {}; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl get cronjobs ${nsArg} -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No cronjobs found" }] }; }
- server.js:116-127 (schema)Tool definition including name, description, and input schema for the 'list-cronjobs' tool.name: "list-cronjobs", description: "List Kubernetes cronjobs in a namespace", inputSchema: { type: "object", properties: { namespace: { type: "string", description: "The namespace to list cronjobs from (optional, defaults to current context namespace)" } } } },
- server.js:1392-1394 (registration)Registration of all tools list handler, which includes 'list-cronjobs' in the tools array.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });