Validate a misata.yaml
validate_yamlValidate a misata.yaml document before generating synthetic data. It first checks schema structure, then semantic rules, and returns actionable errors and fixes if anything is invalid.
Instructions
Validate a misata.yaml document at two levels.
Runs both checks in sequence:
Structural — the published JSON Schema (correct field types, required fields, enum values). Catches typos and shape errors.
Semantic —
misata.validate_schema(probabilities sum to 1.0, every foreign_key has a matching Relationship, no cycles, outcome curves reference real columns, etc.). These are the rules that would crash generation; the error messages include suggested fixes.
Use this when an agent has authored or edited a misata.yaml on the
user's behalf and wants to confirm it parses and will actually
generate before invoking generate_dataset.
Args: yaml_text: The full contents of a misata.yaml file as a string.
Returns:
{"valid": true} if both checks pass; otherwise
{"valid": false, "errors": [...], "stage": "structural"|"semantic"}
with the layer that failed first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| yaml_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |