Skip to main content
Glama

train_doctor

Preflight and set up the training environment: verify Docker/GPU readiness, bootstrap the native trainer, or build the GPU Docker image.

Instructions

Preflight and set up the TRAINER ITSELF — the docker/GPU/venv machinery every training job needs. Touches no dataset and no job. Driven by the action parameter:

  • action:"doctor" — Preflight the local trainer: docker daemon reachable, --gpus all GPU passthrough working (NVIDIA Container Toolkit), trainer image built. Read-only, takes no other parameters. Returns per-check booleans + setup hints. Also reports the training data root and whether HF_TOKEN is set (needed to download FLUX.1-dev on first run), the native (dockerless) bootstrap status, and the connected pod. Run this first when a training start fails.

  • action:"bootstrap" — Set up the NATIVE (dockerless) trainer on this machine (target 'local', the default) or on a pod (target 'pod', optional pod_id): clone ai-toolkit at the pinned commit, create its venv, install torch + requirements. One-time per machine/pod (~10 min fresh, idempotent; a pod's /workspace persists it across restarts). Needed before a target 'pod' train_start on a fresh pod (no docker there). Long-running.

  • action:"build_image" — Build the headless GPU trainer image (comfyui-mcp-trainer:latest) from docker/trainer/Dockerfile — one-time, several minutes (CUDA + torch + ai-toolkit). Requires a reachable docker daemon. aiToolkitRef pins the ai-toolkit commit/tag for reproducibility. The docker alternative to action:"bootstrap".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich trainer-setup operation to perform. "doctor" is read-only and takes no other parameters; "bootstrap" takes `target` (+ `pod_id` for target 'pod'); "build_image" takes an optional `aiToolkitRef`. None of them touches a dataset or a job.
pod_idNoaction:"bootstrap" — pod to bootstrap (target 'pod'). Default: the connected pod.
targetNoaction:"bootstrap" — where to install the native trainer. Default local.local
aiToolkitRefNoaction:"build_image" — ai-toolkit git ref (commit/tag) to build against. Default: the Dockerfile's pinned ref.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses read-only status of 'doctor,' idempotency and time cost of 'bootstrap,' and docker-daemon requirement for 'build_image.' It also notes side-effect boundaries ('Touches no dataset and no job') and environment details (HF_TOKEN, NVIDIA Container Toolkit). Lacks explicit failure/error behavior, but this is already generous.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but organized by action with bullet-style formatting. Every sentence contributes operational detail (prereqs, timing, idempotency), though it could be tightened without losing information. Front-loaded with the core purpose before diving into actions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, 3 action modes, and no output schema, the description is remarkably complete. It covers purpose, when to use each action, prerequisites, runtime expectations, and what is touched/not touched. This is more than sufficient for an agent to select and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, giving a baseline of 3, but the description goes well beyond by explaining each action's parameter interplay, defaults, and constraints. For example, it clarifies that 'doctor' takes no other parameters, 'bootstrap' takes target/pod_id, and 'build_image' takes aiToolkitRef with default behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's role: 'Preflight and set up the TRAINER ITSELF — the docker/GPU/venv machinery every training job needs.' It further distinguishes from siblings by explicitly saying 'Touches no dataset and no job,' marking it as distinct from training job and dataset tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use guidance: 'Run this first when a training start fails' and 'Needed before a target "pod" train_start on a fresh pod.' It also frames the build_image action as 'The docker alternative to action:"bootstrap"' with actionable prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/artokun/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server