A Model Context Protocol server for Kubernetes operations, providing kubectl command execution, base64 encoding/decoding, and cluster diagnostics with comprehensive error handling and telemetry
The server defines 2 tools with mixed quality. The kubectl tool has a detailed, LLM-optimized description with clear examples and comprehensive parameter documentation, but lacks explicit schema output documentation and relies on elicitation for dangerous operations rather than pre-validation. The base64 tool has good schema coverage with enum constraints but a shorter, less contextual description. Both tools have properly typed input schemas with descriptions. Parameter naming follows verb_noun conventions (kubectl, base64 actions), but the kubectl tool conflates read and destructive operations in one tool, violating single-responsibility. Neither tool documents output schemas explicitly. Error handling is present in the implementation (CommandError in helpers) but not reflected in the tool descriptions as recovery guidance. The server demonstrates awareness of security (confirmation prompts, redaction in telemetry) but lacks audit logging references in tool docs.
Encode or decode base64 text. Args: text: The text to encode or base64 string to decode action: Action to perform - "encode" or "decode" encoding: Text encoding to use (default: utf-8) Returns: Encoded or decoded string based on action Examples: base64("Hello World", "encode") -> "SGVsbG8gV29ybGQ=" base64("SGVsbG8gV29ybGQ=", "decode") -> "Hello World" base64("Hello 世界", "encode", "utf-8") -> "SGVsbG8g5LiW55WM"
Execute kubectl commands with comprehensive error handling. Dangerous commands (delete, apply, create, etc.) will prompt for user confirmation before execution to prevent accidental cluster modifications. Args: cmd: kubectl command as a string (without 'kubectl' prefix) context: Kubernetes context to use (default: current context from kubectl config) namespace: Kubernetes namespace to use (default: "default") output_format: Output format (json, yaml, table, etc.) timeout: Command timeout in seconds (default: 30.0) Returns: Command output, parsed as JSON if output_format is 'json' Examples: kubectl("get pods") - Get all pods in JSON format (no confirmation) kubectl("get pods", namespace="kube-system", output_format="table") kubectl("describe pod my-pod", context="my-cluster") kubectl("logs deployment/my-app --tail=100") kubectl("apply -f deployment.yaml") - Will ask for confirmation kubectl("delete pod my-pod") - Will ask for confirmation
kubectl tool combines read (get, describe, logs) and destructive (delete, apply, create) operations in a single tool. This violates single-responsibility principle, LLMs may select the wrong operation when multiple kubectl variants would be clearer.
Output schemas not explicitly documented. The kubectl tool description mentions 'parsed as JSON if output_format is json' and base64 mentions 'Encoded or decoded string', but neither tool description formally specifies the response structure for downstream tool composition. LLMs need explicit output field names for chaining.
Error handling lacks recovery guidance in tool descriptions. The implementation includes CommandError handling and redaction logic, but tool descriptions do not tell the LLM what to do on failure (e.g., 'If context not found, call kubectl(..., context=None) to reset' or 'If decode fails, verify the base64 string is valid').
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 64 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 52 | - | v1 |
kubectl parameter 'cmd' is a free-form string with no enum or pattern constraint. LLMs frequently hallucinate invalid kubectl commands. No validation hints in the description (e.g., 'Must start with a valid kubectl verb: get, describe, delete, apply, create, logs, etc.').
base64 tool name is generic and does not follow verb_noun convention. 'encode_base64' or 'decode_base64' would be clearer. Current name 'base64' requires LLMs to read the description to understand it's an encoding/decoding utility, not a data structure.
kubectl confirmation prompt relies on elicitation (user interaction) for dangerous commands, but the tool description does not explain the flow: does the LLM see the confirmation result? Will it be blocked if denied? No guidance on how to handle DeclinedElicitation vs AcceptedElicitation in the prompt.
Missing parameter validation bounds. The 'timeout' parameter accepts a float with default 30.0 but no documented range (e.g., 'must be between 1 and 300 seconds'). LLMs could pass unrealistic values like 0.001 or 86400.
kubectl context and namespace parameters default to the current kubectl config or 'default' namespace, but the descriptions do not explain fallback behavior clearly. If a context does not exist, what error is returned?