Skip to main content
The validate command analyzes Minecraft projects for errors, warnings, and adherence to best practices. It supports multiple validation suites and can process single projects or batch validate multiple projects.

Syntax

mct validate [suite] [exclusions] [aggregateReports] [options]

Arguments

suite
string
default:"main"
The validation suite to run.Choices:
  • all - Run all available validation tests
  • default - Default validation suite
  • addon - Strict validation for marketplace add-ons
  • currentplatform - Validate against current platform versions
  • main - Most commonly used validation tests (default)
exclusions
string
Comma-separated list of test codes to exclude from validation.Example: PATHLENGTH,PACKSIZE
aggregateReports
string
Control report aggregation across multiple projects.Choices:
  • aggregate - Aggregate reports and build content index
  • aggregatenoindex - Aggregate reports without building index
  • true, 1 - Same as aggregate
  • false, 0 - No aggregation

Options

-i, --input-folder
string
Path to the project folder to validate.
-if, --input-file
string
Path to a packaged file (MCWorld, MCTemplate, MCPack, MCAddon) to validate.
-o, --output-folder
string
default:"out"
Path where validation reports will be written.
-show, --display-only
boolean
Display validation results in the console instead of writing report files.
--threads
number
default:"8"
Number of worker threads for parallel validation. Use 1 for sequential processing.
-lv, --log-verbose
boolean
Show detailed logging information during validation.
-psw, --project-starts-with
string
Only validate projects whose names start with this prefix. Useful for batch processing subsets.
-ot, --output-type
string
Type of output to generate.Choices:
  • noreports - Skip report file generation

Examples

Validate a single project folder

mct validate -i ./my-addon -show
Project name: My Addon
Project description: An example Minecraft addon

✓ No errors found
⚠ 2 warnings
  - [BP001] Script file missing proper header comment
  - [RP003] Texture resolution exceeds recommended size

Validate with strict addon suite

mct validate addon -i ./my-addon -show --log-verbose
This runs the strict marketplace validation suite with detailed logging.

Validate a packaged file

mct validate -if ./packages/myaddon.mcaddon -show

Batch validate multiple projects

mct validate -i ./projects -o ./validation-results aggregate
This validates all projects in the ./projects folder and creates aggregated reports.

Validate with exclusions

mct validate main "PATHLENGTH,PACKSIZE" -i ./my-addon -show
Validates the project but skips path length and pack size checks.

Validate with parallel processing

mct validate -i ./projects --threads 16 aggregate
Uses 16 worker threads to validate projects in parallel.

Sequential validation (debugging)

mct validate -i ./my-addon --threads 1 -show -lv
Uses single-threaded processing with verbose logging for debugging.

Validation Output

Console Output

When using -show, validation results appear in the console:
┌─────┐
 Minecraft Creator Tools (preview) command line
 ┏▀┓ See https://aka.ms/mcthomepage for more info.
└─────┘

=== Validation Results ===

Errors: 0
Warnings: 2
Info: 5

 Warning [BP001]: Missing header comment in scripts/main.js:1
 Warning [RP003]: Large texture file at textures/entity/player.png (4096x4096)

 Info: Found 3 entities
 Info: Found 5 items
 Info: Found 2 blocks

File Output

Without -show, reports are written to the output folder:
out/
├── my-addon.json          # Detailed validation report
├── my-addon.csv           # CSV format for spreadsheet analysis
└── all.csv                # Aggregated report (if using aggregate)

Validation Suites

The most commonly used validation suite. Checks for:
  • Syntax errors in JSON files
  • Missing required files
  • Invalid references
  • Common mistakes
  • Basic best practices

Multi-Project Validation

The CLI supports three project detection modes:

Single Project

Point to a folder containing a Minecraft project:
mct validate -i ./my-addon

Multi-Level Multi-Project

Parent folder with subfolders containing zip files:
projects/
├── coolgame/
│   ├── coolgame.mcaddon
│   └── coolgame.data.json
└── swellgame/
    ├── swellgame.mcaddon
    └── swellgame.data.json
mct validate -i ./projects aggregate

Children-of-Folder Multi-Project

Folder with multiple project subfolders or zip files:
projects/
├── addon1/
│   ├── behavior_packs/
│   └── resource_packs/
├── addon2/
│   ├── behavior_packs/
│   └── resource_packs/
└── addon3.mcaddon
mct validate -i ./projects aggregate

Performance Optimization

Thread Configuration

The --threads option controls parallelization:
  • Default (8 threads): Good balance for most systems
  • More threads (16+): Better for validating many small projects
  • Sequential (1 thread): Better for debugging or memory-constrained environments
# Maximum parallelization
mct validate -i ./projects --threads 16

# Sequential for debugging
mct validate -i ./my-addon --threads 1 -lv

Memory Considerations

Each worker thread has a 16GB memory limit. For large projects, consider:
  • Using fewer threads
  • Validating projects individually
  • Using output files instead of -show

Aggregated Reports

When validating multiple projects with the aggregate option: Generated Files:
  • all.csv - All validation issues across projects
  • allprojects.csv - Summary statistics per project
  • mci/index.json - Content index of all projects
Example:
mct validate -i ./marketplace-addons -o ./reports aggregate

Exit Codes

CodeDescription
0Validation passed with no errors
53Internal processing error
56Test failure
57Validation error found

Troubleshooting

Reduce the number of threads or use sequential processing:
mct validate -i ./large-project --threads 1
Use fewer threads and output to files instead of console:
mct validate -i ./projects --threads 4 -o ./results
Use the -psw option to filter or validate individually:
# Only projects starting with "test"
mct validate -i ./projects -psw test

Build docs developers (and LLMs) love