UNPKG

mcp-server-kubernetes

Version:

MCP server for interacting with Kubernetes clusters via kubectl

76 lines (75 loc) 2.75 kB
import { KubernetesManager } from "../types.js"; export declare const kubectlGetSchema: { readonly name: "kubectl_get"; readonly description: "Get or list Kubernetes resources by resource type, name, and optionally namespace"; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly resourceType: { readonly type: "string"; readonly description: "Type of resource to get (e.g., pods, deployments, services, configmaps, events, etc.)"; }; readonly name: { readonly type: "string"; readonly description: "Name of the resource (optional - if not provided, lists all resources of the specified type)"; }; readonly namespace: { type: "string"; description: string; default: string; }; readonly output: { readonly type: "string"; readonly enum: readonly ["json", "yaml", "wide", "name", "custom"]; readonly description: "Output format"; readonly default: "json"; }; readonly allNamespaces: { readonly type: "boolean"; readonly description: "If true, list resources across all namespaces"; readonly default: false; }; readonly labelSelector: { readonly type: "string"; readonly description: "Filter resources by label selector (e.g. 'app=nginx')"; }; readonly fieldSelector: { readonly type: "string"; readonly description: "Filter resources by field selector (e.g. 'metadata.name=my-pod')"; }; readonly sortBy: { readonly type: "string"; readonly description: "Sort events by a field (default: lastTimestamp). Only applicable for events."; }; readonly context: { type: "string"; description: string; default: string; }; }; readonly required: readonly ["resourceType", "name", "namespace"]; }; }; export declare function kubectlGet(k8sManager: KubernetesManager, input: { resourceType: string; name?: string; namespace?: string; output?: string; allNamespaces?: boolean; labelSelector?: string; fieldSelector?: string; sortBy?: string; context?: string; }): Promise<{ content: { type: string; text: string; }[]; isError?: undefined; } | { content: { type: string; text: string; }[]; isError: boolean; }>;