Skip to main content
Glama
Trestle MCP

Trestle MCP

Official

Assemble Catalog JSON from Markdown

trestle_author_catalog_assemble
Destructive

Writes edited markdown control files back into a catalog JSON, completing the authoring round trip. Set parameters to preserve YAML header changes such as parameter values and properties.

Instructions

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.

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_author_catalog_assemble"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive=true and non-idempotent, and the description adds the non-obvious behavior those annotations cannot express: header edits are silently discarded unless set_parameters is set, and regenerate forces new uuids. It also names the exact write target (catalogs/<output>/catalog.json), so the overwrite consequence is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose, round-trip framing, and the set_parameters warning are front-loaded and earn their space. The Args block largely mirrors the nested schema descriptions already present in $defs, which is mildly redundant, though it keeps the parameter meanings in one readable place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating round-trip tool this covers what an agent needs: purpose, prerequisite, the silent-failure trap, the alternative sibling, and a return-value note (with an output schema also present). Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Top-level schema coverage is 0% (a single params wrapper), so the description must carry the parameter burden and does: it documents every nested field with defaults and, crucially, the behavioral consequence of set_parameters and regenerate. This goes beyond restating the nested schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (assemble markdown control files into a Catalog json) and frames it as the return leg of a named round trip with trestle_author_catalog_generate. An agent can distinguish it from the generate sibling and from trestle_author_profile_assemble without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit workflow (generate markdown, edit prose or yaml header, then assemble) plus concrete 'Use when' and 'Don't use when' examples. It names the alternative for the profile case (trestle_author_profile_assemble) and states the prerequisite that the markdown must have been generated from a catalog.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.