Import OSCAL Model
trestle_importImport OSCAL models from URLs or local file paths into a Trestle workspace, automatically saving each model in the directory for its OSCAL type.
Instructions
Import an existing OSCAL model into the trestle workspace.
This tool imports OSCAL models from URLs or local file paths. The imported file will be saved in the appropriate directory based on its OSCAL type (e.g., catalogs/, profiles/, component-definitions/).
Import Behavior:
Catalog → catalogs/{output}/catalog.json
Profile → profiles/{output}/profile.json
Component Definition → component-definitions/{output}/component-definition.json
SSP → system-security-plans/{output}/system-security-plan.json
Args: params (TrestleImportInput): Validated input parameters containing: - file (str): OSCAL file to import (URL or file path) - output (str): Name of output element - regenerate (bool): Force generation of new UUIDs (default: false) - trestle_root (Optional[str]): Path to trestle root directory - verbose (bool): Display verbose output (default: false)
Returns: str: Success message with import details or error
Examples: - Import NIST SP800-53 Rev5 Catalog: file="https://raw.githubusercontent.com/usnistgov/oscal-content/refs/heads/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_catalog.json" output="nist_sp800_53_rev5"
- Import from local file:
file="./resources/catalogs/your_catalog.json"
output="mycatalog"
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_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |