Validate OSCAL Document
trestle_validateValidate a standalone OSCAL file against the OSCAL schema, and optionally run semantic checks for duplicate UUIDs, broken references, links, and rule parameters.
Instructions
Validate a standalone OSCAL file against the OSCAL schema.
This tool loads the OSCAL document through the trestle model classes, which enforces the OSCAL schema (required fields, field types, enums, UUID formats, and nesting). Optionally it also runs trestle's semantic validators (duplicate UUIDs, broken internal references, links, and rule parameters).
It detects the model type from the file's single top-level wrapper key, so
it validates any top-level OSCAL model: catalog, profile,
component-definition, system-security-plan, assessment-plan,
assessment-results, mapping-collection, or plan-of-action-and-milestones --
the same list as model_type elsewhere in this server.
Unlike trestle validate on the CLI, this works on a standalone file that
is not part of a trestle workspace — for example a POA&M JSON produced by an
authoring flow.
Args: params (TrestleValidateInput): Input parameters with: - file (str): Path to the OSCAL .json/.yaml/.yml file (required) - expected_model_type (Optional[str]): Enforce the file is this model type (e.g. 'plan-of-action-and-milestones') - semantic (bool): Run semantic validators too (default: true)
Returns: str: A pass/fail message; on failure, the concrete reasons.
Examples:
- Use when: "Validate this POA&M JSON is valid OSCAL"
file="./poam.json", expected_model_type="plan-of-action-and-milestones"
- Use when: "Check that catalog.json conforms to the OSCAL schema"
- Don't use when: The file is inside a trestle workspace and you want
the full trestle validate workspace checks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"params": "<params>"
},
"name": "trestle_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |