Skip to main content
Glama
Trestle MCP

Trestle MCP

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
trestle_initA

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.

trestle_importA

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"
trestle_validateA

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.

trestle_author_catalog_generateA

Generate Catalog controls in markdown form from a catalog in the trestle workspace.

Args: params (TrestleCatalogGenerateInput): Input parameters with: - name (str): Catalog model name (required) - output (str): Output markdown folder (required) - force_overwrite (bool): Force overwrite markdowns (optional) - yaml_header (Optional[str]): Path to yaml header file (optional) - overwrite_header_values (bool): Overwrite markdown header values (optional) - trestle_root (Optional[str]): Trestle workspace root path (optional) - verbose (bool): Display verbose output (optional)

Returns: str: Success or error message

Examples: - Use when: "Generate markdown controls from a catalog" - Use when: "Split a catalog JSON into control-wise markdowns" - Don't use when: "Catalog is missing or output directory already exists and not overwritten"

trestle_author_catalog_assembleA

Assemble markdown files of controls into a Catalog json file.

This is the return leg of the catalog authoring round trip: run trestle_author_catalog_generate to get markdown, edit the control prose or the yaml header, then run this tool to write the edits back into catalogs//catalog.json.

Set set_parameters when the edits include parameter values or properties in the markdown yaml header — without it only the control prose is read back, and header edits are silently discarded.

Args: params (TrestleAuthorCatalogAssembleInput): Input parameters with: - markdown (str): Input markdown control directory (required) - output (str): Output json catalog name (required) - name (Optional[str]): Source catalog model name (defaults to output) - set_parameters (bool): Read parameters and properties from the markdown yaml header (default: false) - regenerate (bool): Force generation of new uuids (default: false) - version (Optional[str]): New version for the assembled model - trestle_root (Optional[str]): Trestle workspace root path - verbose (bool): Display verbose output

Returns: str: Success or error message

Examples: - Use when: "Write my markdown control edits back into the catalog json" - Use when: "Assemble a catalog from markdown and stamp it version 1.1.0" - Don't use when: The markdown directory was never generated from a catalog — assemble cannot invent the catalog metadata it needs. - Don't use when: You want a profile json out of profile markdown; use trestle_author_profile_assemble.

trestle_author_profile_generateB

Generate markdown documentation set for controls defined in specified profile.

This tool extracts controls defined in the specified profile (profiles//profile.json) and generates a set of markdown documents for them. This set can be used for custom documentation, reviews, and organization-specific profile documentation.

Args: params (TrestleAuthorProfileGenerateInput): - name (str): profile name (required) - output (str): output directory for markdown docs (required) - yaml_header (Optional[str]): yaml header file path - force_overwrite (bool): overwrite all in output dir - overwrite_header_values (bool): overwrite header values only - sections (Optional[str]): targeted sections in markdown - required_sections (Optional[str]): required section short names, comma-separated - trestle_root (Optional[str]): workspace root path - verbose (bool): verbose output

Returns: str: Success message or error details

Examples: - Use when: "Generate markdown controls for a given profile" - Use when: "Customize output with required sections or header overwrite" - Don't use when: Profile file does not exist

trestle_author_profile_assembleA

Assemble markdown controls into a Profile JSON file.

This tool assembles an OSCAL profile JSON (profile.json) from a directory of markdown controls for a profile.

Args: params (TrestleAuthorProfileAssembleInput): - markdown_dir (str): Markdown controls directory (required) - output_profile (str): Output profile directory name (required) - name (Optional[str]): Profile model name - set_parameters (bool): Expand parameters from YAML frontmatter - regenerate (bool): Force UUID regeneration - version (Optional[str]): Model version - sections (Optional[str]): Section info (short:long, comma-separated) - required_sections (Optional[str]): Required section short names, comma-separated - allowed_sections (Optional[str]): Allowed section short names, comma-separated - verbose (bool): Verbose output - trestle_root (Optional[str]): Path of trestle root directory

Returns: str: Success message with stdout, or error message with stderr details

Examples: - Use when: Automatically assemble OSCAL profile from markdown directory - Use when: CI/CD profile assembling, parameter expansion - Don't use when: Input markdown_dir does not exist, or malformed markdown

trestle_author_profile_resolveA

Resolve an OSCAL profile to a resolved profile catalog.

This tool resolves a specified OSCAL profile (by name from profiles//profile.json) into an operational, parameter-resolved OSCAL catalog, with flexible output and formatting options.

Args: params (TrestleAuthorProfileResolveInput): - name (str): Source profile name (required) - output (str): Output catalog name (required) - show_values (bool): Show parameter values in prose (optional) - show_labels (bool): Show parameter labels in prose (optional) - bracket_format (str): Bracket format for values (optional) - value_assigned_prefix (str): Prefix if value is assigned (optional) - value_not_assigned_prefix (str): Prefix if value not assigned (optional) - label_prefix (str): Prefix for label output (optional) - verbose (bool): Display verbose output (optional) - trestle_root (str): Path to trestle root directory (optional)

Returns: str: Result summary string. On success, a checked message with output. On failure, a cross mark and error details.

Examples: - Minimal invocation trestle_author_profile_resolve(name="myprofile", output="catalog_resolved") - With options trestle_author_profile_resolve(name="myprofile", output="catalog_resolved", show_values=True, bracket_format="(.)")

trestle_author_component_generateA

Generate component in markdown form from a component-definition in the trestle workspace.

This writes one markdown file per control implementation, per component, under ///. The markdown is where an author writes the implementation prose and the rule/parameter yaml header that trestle_author_component_assemble reads back.

Note that generate only writes what the component-definition already declares: it will not create implemented requirements for controls the component-definition does not claim.

Args: params (TrestleAuthorComponentGenerateInput): Input parameters with: - name (str): Source component-definition model name (required) - output (str): Output markdown folder (required) - force_overwrite (bool): Overwrite existing markdown content, discarding edits (default: false) - trestle_root (Optional[str]): Trestle workspace root path - verbose (bool): Display verbose output

Returns: str: Success or error message

Examples: - Use when: "Generate editable markdown for this component definition" - Use when: "Let me write implementation prose for each control a component claims" - Don't use when: There is no component-definition in the workspace yet; import one, or create one with trestle_task_csv_to_oscal_cd. - Don't use when: You only want to regenerate without losing edits — force_overwrite discards author prose.

trestle_author_component_assembleA

Assemble markdown files of controls into a component-definition json file.

This is the return leg of the component authoring round trip: generate markdown with trestle_author_component_generate, edit the implementation prose and the rule/parameter yaml headers, then assemble back into component-definitions//component-definition.json.

Unlike catalog-assemble and profile-assemble there is no set-parameters flag — component markdown headers (rules, parameter values, implementation status) are always read back.

Pass name whenever output is a name that does not already exist. The source model defaults to the output name, so assembling into a new component-definition without name fails with "Unable to load model without specifying json or yaml". (catalog-assemble does not have this constraint — it takes the source from the markdown header.)

Args: params (TrestleAuthorComponentAssembleInput): Input parameters with: - markdown (str): Source markdown directory (required) - output (str): Output json component-definition name (required) - name (Optional[str]): Source component-definition model name (defaults to output) - regenerate (bool): Force generation of new uuids (default: false) - version (Optional[str]): New version for the assembled model - trestle_root (Optional[str]): Trestle workspace root path - verbose (bool): Display verbose output

Returns: str: Success or error message

Examples: - Use when: "Write the implementation prose I edited back into the component definition" - Use when: "Assemble the component definition and bump its version" - Don't use when: The markdown directory was not produced by component-generate.

trestle_task_csv_to_oscal_cdB

Convert a CSV file to an OSCAL component definition JSON file.

This tool runs the trestle task csv-to-oscal-cd command, which reads a specially formatted CSV file and produces an OSCAL component_definition .json file.

The CSV must have:

  • Row 1: column headings

  • Row 2: column descriptions

  • Row 3+: data rows

Required CSV columns:

  • $$Component_Title, $$Component_Description, $$Component_Type

  • $$Rule_Id, $$Rule_Description, $$Profile_Source, $$Profile_Description

  • $$Control_Id_List, $$Namespace

Args: params (TrestleTaskCsvToOscalCdInput): Input parameters with: - title (str): Component definition title (required) - version (str): Component definition version (required) - csv_file (str): Path to the input CSV file (required) - output_dir (str): Output directory for OSCAL JSON files (required) - component_definition (Optional[str]): Existing component-definition to update (optional) - output_overwrite (bool): Overwrite existing output (default: true) - validate_controls (str): Control validation mode: on/warn/off (default: off) - class_column_mappings (Optional[dict]): Column-to-class mappings (optional) - trestle_root (Optional[str]): Trestle workspace root path (optional) - verbose (bool): Display verbose output (optional)

Returns: str: Success or error message with output file location

Examples: - Use when: "Convert CSV to OSCAL component definition" - Use when: "Generate component_definition.json from a CSV mapping file" - Don't use when: Input CSV is missing required columns

trestle_task_csv_to_oscal_mcA

Convert a CSV file to an OSCAL mapping-collection JSON file.

This tool runs the trestle task csv-to-oscal-mc command, which reads a specially formatted CSV of control-to-control correspondences and produces mapping-collection.json — the OSCAL model for "control X over here means the same thing as controls Y and Z over there".

The CSV must have:

  • Row 1: column headings

  • Row 2: column descriptions

  • Row 3+: data rows

Required CSV columns:

  • $$Source_Resource, $$Target_Resource: for each side, a path to a catalog JSON file or an href to a profile. Both sides are loaded and every id in the ref lists is looked up in them. An id that is not found is dropped without a warning, and the row is still written with whatever ids did resolve: ac-1 ac-99-typo on one side produces a map naming ac-1 only, and the run reports success. It fails only when nothing in a row's list resolves at all. So a successful run does not mean every id in the CSV made it into the output -- check the id-refs in mapping-collection.json against the CSV if the mapping has to be complete.

  • $$Map_Source_Id_Ref_List, $$Map_Target_Id_Ref_List: whitespace-separated control ids, or statement ids such as ac-1_smt.a. Several ids on one side are what makes a mapping many-to-many.

  • $$Map_Relationship: the relationship type, as an NCName token. The conventional values are the NIST IR 8477 section 4.3 set-theory relationships — equivalent, subset-of, superset-of, intersects-with, no-relationship — but trestle does not restrict the vocabulary. Leave the cell empty to declare a control unmapped: it is then recorded in the gap summary instead of producing a map entry.

Optional CSV columns:

  • $$Map_Confidence_Score, $$Map_Coverage: percentages expressed in the range 0 to 1, not 0 to 100. A value of 80 is silently dropped with a "Percentage value out of range" warning and the map entry is written without it; write 0.8.

Resource paths in the CSV are resolved relative to the trestle process's working directory, which is trestle_root when you pass one and wherever the server was started when you do not. Pass trestle_root, or use absolute paths, so the CSV does not depend on how the server was launched.

Args: params (TrestleTaskCsvToOscalMcInput): Input parameters with: - title (str): Mapping collection title (required) - version (str): Mapping collection version (required) - csv_file (str): Path to the input CSV file (required) - output_dir (str): Output directory for mapping-collection.json (required) - output_overwrite (bool): Overwrite existing output (default: true) - trestle_root (Optional[str]): Trestle workspace root path (optional) - verbose (bool): Display verbose output (optional)

Returns: str: Success or error message with the output file location

Examples: - Use when: "Map our internal control set onto NIST SP 800-53" - Use when: "Produce an OSCAL mapping collection from this crosswalk spreadsheet" - Don't use when: You want a component definition out of a CSV; use trestle_task_csv_to_oscal_cd. - Don't use when: The CSV is missing a required column, or names control ids that are not in the source or target resource.

trestle_task_xlsx_to_oscal_poamA

Convert a FedRAMP XLSX spreadsheet to an OSCAL POA&M JSON file.

This tool runs the trestle task xlsx-to-oscal-poam command, which reads a FedRAMP-format .xlsx spreadsheet and produces an OSCAL plan-of-action-and-milestones .json file. The converter auto-generates the observations[] and risks[] and cross-links each poam-item to them with deterministic UUIDs.

This command must run inside a trestle workspace: initialize one first with trestle_init and pass its path as trestle_root (or run from within it).

The spreadsheet must have:

  • Row 1: title

  • Rows 2-4: instructions (ignored)

  • Row 5: column headers

  • Row 6+: data rows

Required columns:

  • POAM ID, Weakness Name, Weakness Description, Controls

Args: params (TrestleTaskXlsxToOscalPoamInput): Input parameters with: - title (str): POA&M title (required) - version (str): POA&M version (required) - xlsx_file (str): Path to the input .xlsx file (required) - output_dir (str): Output directory for the OSCAL JSON (required) - work_sheet_name (Optional[str]): Worksheet name (default: 'Open POA&M Items') - system_id (Optional[str]): System identifier (optional) - output_overwrite (bool): Overwrite existing output (default: true) - validate_required_fields (str): Required-field check: on/warn/off (default: warn) - quiet (bool): Suppress per-item output (default: false) - trestle_root (Optional[str]): Trestle workspace root path (optional) - verbose (bool): Display verbose output (optional)

Returns: str: Success or error message with output file location

Examples: - Use when: "Convert this FedRAMP POA&M spreadsheet to OSCAL" - Use when: "Generate plan-of-action-and-milestones.json from an xlsx" - Don't use when: The input is a CSV, or is missing required columns

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 13 tools

Disambiguation5/5

Each tool targets a distinct model+action combination: the catalog/profile/component generate-vs-assemble pairs are explicitly framed as round-trip halves, and the task converters are separated by input format and output model. trestle_validate and trestle_import have clear roles, and profile_resolve is uniquely a profile-to-catalog operation.

Naming Consistency4/5

All names are snake_case with a coherent trestle_ prefix and a consistent verb_noun shape within three clear sub-namespaces (trestle_<verb>, trestle_author_<model>_<verb>, trestle_task_<format>_to_oscal_<model>). The only minor deviation is profile_resolve sitting among the authoring verbs, but it remains readable and predictable.

Tool Count5/5

Thirteen tools is squarely in the well-scoped range and each earns its place: one init/import/validate plus paired authoring tools for three model types plus three format converters. There is no filler or duplicate tool.

Completeness4/5

The surface covers the core lifecycle: workspace init, import, validate, full generate/assemble round-trips for catalog, profile, and component-definition, and CSV/XLSX conversion tasks. Gaps remain — no listing/inventory of workspace models, no explicit export, and SSP/assessment/POA&M authoring only via import or conversion — but these are workaroundable.

Maintenance

ActivityNo data
ResponsivenessOutdated data