Quality Assurance
Related Topics: Quickstart (getting started) | CLI Reference (command options) | Common Tasks (quick how-to)
MXCP provides a comprehensive 4-layer quality framework to ensure your endpoints are production-ready. This section covers validation, testing, linting, and LLM evaluation.
Quality Layers
Section titled “Quality Layers”Quick Start
Section titled “Quick Start”# Validate all endpointsmxcp validate
# Run testsmxcp test
# Check metadata qualitymxcp lint
# Run LLM evaluationsmxcp evalsTopics
Section titled “Topics”Verify endpoint structure and syntax:
- YAML correctness
- Required fields
- Type definitions
- File references
Test endpoint functionality:
- Test case definitions
- Assertion types
- Policy testing
- CI/CD integration
Improve AI comprehension:
- Description quality
- Example coverage
- Best practice checks
- Auto-suggestions
Test AI behavior:
- LLM tool usage
- Safety verification
- Permission testing
- Multi-model support
Workflow Integration
Section titled “Workflow Integration”Development
Section titled “Development”# After creating/modifying an endpointmxcp validate # Check structuremxcp test # Verify functionalitymxcp lint # Improve metadataPre-Commit
Section titled “Pre-Commit”# Run all quality checksmxcp validate && mxcp test && mxcp lintCI/CD Pipeline
Section titled “CI/CD Pipeline”name: Quality Checkson: [push, pull_request]
jobs: quality: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.11' - run: pip install mxcp - run: mxcp validate - run: mxcp test --json-output > test-results.json - run: mxcp lint --json-output > lint-results.jsonPre-Production
Section titled “Pre-Production”# Before deploymentmxcp validatemxcp testmxcp lintmxcp evals # Test AI behaviormxcp drift-snapshot # Create baselineBest Practices
Section titled “Best Practices”1. Validate Early
Section titled “1. Validate Early”Run mxcp validate frequently during development.
2. Write Tests
Section titled “2. Write Tests”Add tests to every endpoint definition.
3. Address Lint Issues
Section titled “3. Address Lint Issues”Fix warnings to improve AI understanding.
4. Test AI Behavior
Section titled “4. Test AI Behavior”Use evals for critical endpoints.
5. Automate
Section titled “5. Automate”Include quality checks in CI/CD.
Command Reference
Section titled “Command Reference”Validation
Section titled “Validation”mxcp validate # Validate allmxcp validate --json-output # JSON outputTesting
Section titled “Testing”mxcp test # Run all testsmxcp test tool my_tool # Test specific toolmxcp test resource my_res # Test specific resourcemxcp test --json-output # JSON outputLinting
Section titled “Linting”mxcp lint # Check all endpointsmxcp lint --severity warning # Show warnings onlymxcp lint --json-output # JSON outputmxcp evals # Run all evalsmxcp evals my_suite # Run specific suitemxcp evals --model gpt-4o # Use specific modelNext Steps
Section titled “Next Steps”- Validation - Structural checks
- Testing - Functional testing
- Linting - Metadata quality
- Evals - AI behavior testing