An MCP server for Kubeflow Trainer
Server has 4 tools with complete input schemas and descriptions, but quality is uneven. Tool names follow verb_noun convention (list_, create_, delete_) which is good. Descriptions are present but vary in clarity and actionability. Critical gaps: no output schema documentation, missing parameter constraints (enums, ranges), no error recovery guidance, and the create_training_job tool accepts arbitrary Python code as a string parameter, a major security risk. Schemas are well-formed JSON with types and descriptions, but lack constraints like min/max for numeric parameters or patterns for strings. Error handling documents exceptions but provides no recovery guidance for LLMs.
Create a training job. Args: runtime_name (str): The name of the runtime to use. function_definition (str): The definition of the function used for training. This should encapsulate all the training logic. Ensure all imports required for the training job are included within the function body. Ensure that only a function definition is provided, with no other code outside the function definition. namespace (str): The namespace in which to create the job. Defaults to the "default" namespace. node_count (Optional[int]): The number of nodes to use for training. Defaults to 2. cpu_limit (Optional[int]): The number of CPUs to use for training. Defaults to 1. memory_limit (Optional[str]): The amount of memory to use for training. Defaults to "1G". Returns: str: The name of the training job created.
Delete a training job. Args: job_name (str): The name of the training job. namespace (str): The namespace in which to delete the job. Defaults to "default". Returns: None: Indicating that job deletion succeeded. Raises: TimeoutError: Timeout when deleting the training job. RuntimeError: Failed to delete training job.
Lists all training jobs in the given namespace. Args: namespace (str): The namespace in which to list training jobs. Defaults to the "default" namespace. Returns: models.TrainerV1alpha1TrainJobList: A training job list.
List all ClusterTrainingRuntimes. Returns: models.TrainerV1alpha1ClusterTrainingRuntimeList: List of available training runtimes. If no runtimes exist, returns a TrainerV1alpha1ClusterTrainingRuntimeList with no items. Raises: TimeoutError: Timeout to list Runtimes. RuntimeError: Failed to list Runtimes.
create_training_job accepts arbitrary Python code as 'function_definition' string parameter with no validation, sanitization, or sandboxing. This is a critical code injection vulnerability, malicious LLMs or prompt-injected agents could execute arbitrary code on the Kubernetes cluster.
No output schema documentation. Tools return Kubeflow model objects (TrainerV1alpha1ClusterTrainingRuntimeList, TrainerV1alpha1TrainJobList) but LLMs cannot infer what fields these contain or how to chain results to downstream tools. create_training_job returns only a job_name string, missing namespace, status, or other identifiers needed for follow-up calls.
Numeric parameters (node_count, cpu_limit) lack min/max constraints. LLMs could pass absurd values (node_count=999999, cpu_limit=0) that break the API or cause resource exhaustion. No validation or error guidance.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | 2026-07-28+ | v2 |
Error handling documents exceptions (TimeoutError, RuntimeError) but provides no recovery guidance. Descriptions say 'Raises: TimeoutError' but do not tell the LLM what to do next, retry? Call a different tool? Ask the user?
namespace parameter defaults to 'default' but description does not explain what happens if the namespace does not exist. Will the tool fail silently, throw an error, or create the namespace? Ambiguity invites misuse.