validate_oscal_content
Validates OSCAL JSON content using a multi-level pipeline: checks JSON validity, schema conformance, semantic rules, and full NIST validation when available.
Instructions
Validate OSCAL JSON content through a multi-level validation pipeline.
Runs up to four validation levels in sequence:
Well-formedness - Is it valid JSON and a JSON object?
JSON Schema - Does it conform to the NIST OSCAL JSON schema?
Trestle - Semantic checks via compliance-trestle Pydantic models
oscal-cli - Full NIST validation if oscal-cli is installed
If Level 1 fails, Levels 2-4 are skipped. If oscal-cli is not installed, Level 4 is gracefully skipped. The overall result is valid only when all non-skipped levels pass.
Args: ctx: MCP server context (injected automatically by MCP server) content: OSCAL JSON content as a string model_type: Optional OSCAL model type (e.g. "catalog", "profile"). If omitted, the model type is auto-detected from the root key.
Returns: dict: Structured validation results with per-level detail
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| model_type | No |