Skip to main content
Glama

train_prepare_dataset

Stage training images and captions into a dataset directory for the trainer. Provide image paths with optional captions and a default fallback caption.

Instructions

Stage training images + captions into a dataset dir the trainer consumes. Each item is an image path with an optional caption (a missing caption falls back to defaultCaption — typically the trigger word). Returns the datasetPath to pass to train_start. Character LoRA guidance: 10-30 varied images; caption what changes between images, keep the trigger word constant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDataset name (becomes the staging dir name).
itemsYes
defaultCaptionNoFallback caption for items without one — usually the trigger word.
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the staging behavior, fallback caption handling, and return value. However, it does not mention potential side effects (e.g., file overwrites, disk space), authorization needs, or validation rules for image formats or paths. The transparency is adequate but not exhaustive.

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

Conciseness5/5

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

The description is three sentences long, front-loaded with the core purpose. Each sentence adds distinct information: main action, item structure, and usage guidance. No wasted words; it is efficient and easy to parse.

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

Completeness4/5

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

Given the tool's moderate complexity and lack of output schema, the description covers the key aspects: purpose, input structure, fallback behavior, and specific use-case guidance. It could mention edge cases (e.g., duplicate names, format validation) but is largely sufficient for an LLM to understand and invoke the tool correctly.

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

Parameters4/5

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

The schema already documents all three parameters (name, items, defaultCaption) with descriptions, achieving 67% coverage. The description adds meaning beyond the schema by explaining the fallback mechanism ('missing caption falls back to defaultCaption') and providing LoRA-specific guidance that ties to the parameters. This adds valuable context.

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 purpose: 'Stage training images + captions into a dataset dir the trainer consumes.' It explains the structure of each item (image path with optional caption) and the fallback mechanism to defaultCaption. It also specifies the return value (datasetPath) and provides specific guidance for Character LoRA, which distinguishes it from sibling tools like train_start or train_bootstrap.

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

Usage Guidelines4/5

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

The description implies this tool is used before training (returns datasetPath to pass to train_start). It provides explicit guidance for Character LoRA usage (10-30 varied images, caption what changes, keep trigger word constant). However, it does not explicitly state when not to use this tool or mention alternative tools, but the context makes its role clear.

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