Initialize Trestle Workspace
trestle_initInitialize a directory as a Trestle workspace, creating the directory structure and configuration for OSCAL model management. Avoid reinitializing; it overwrites existing task config.
Instructions
Initialize a trestle working directory.
This tool initializes the current directory as a Trestle workspace, creating the necessary directory structure for OSCAL model management.
Do not run this on a workspace that is already initialized. Creating
the directories is harmless -- they are only made when missing -- but
local and full mode also copy trestle's stock .trestle/config.ini
over whatever is there, with no check and no warning, and still report
success. That file is where trestle task reads its [task.*] sections
from, so an operator's task configuration is gone. Check for a .trestle
directory before calling this; there is nothing to gain by running it
again.
OSCAL Model Types supported:
Catalog
Profile
Component Definition
System Security Plan (SSP)
Assessment Plan
Assessment Result
Plan of Action and Milestones (POAM)
Args: params (TrestleInitInput): Validated input parameters containing: - mode (InitMode): Initialization mode (local/full/govdocs, default: local) - trestle_root (Optional[str]): Path to trestle root directory - verbose (bool): Display verbose output (default: false)
Returns: str: Success message or error details
Examples: - Use when: "Initialize trestle workspace" - Use when: "Set up trestle in full mode" - Don't use when: Workspace is already initialized — this overwrites .trestle/config.ini rather than leaving it alone.
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_init"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |