Skip to main content
Glama
Trestle MCP

Trestle MCP

Official

Assemble Component Definition from Markdown

trestle_author_component_assemble
Destructive

Assemble edited control markdown into a component-definition JSON, restoring rule and parameter headers. Use it to write component authoring edits back to the definition file.

Instructions

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.

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

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and non-idempotent, and the description reinforces the write-back semantics (headers always read back, uuids regenerated only with regenerate). It adds a genuinely useful failure-mode disclosure: omitting `name` when `output` is new produces 'Unable to load model <output> without specifying json or yaml'. Missing an explicit warning that the existing component-definition.json is overwritten, which is the main destructive consequence.

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?

Front-loaded with the one-line purpose, then workflow context, then the critical `name` caveat, then a compact Args block and examples. Some redundancy between the prose caveat and the Args entry for `name`, and the catalog-assemble parenthetical is a slight digression, but nothing is filler.

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

Completeness4/5

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

For a multi-step mutation tool this covers the workflow position, the input contract, the failure mode, and the version/regenerate semantics; the output schema already documents the return value so no explanation is owed there. The main gap is not spelling out that the target component-definition.json is overwritten in place and what happens to prior content.

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

Parameters4/5

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

With schema coverage reported at 0%, the description compensates by enumerating every field of the nested params object with its meaning and default (markdown, output, name, regenerate, version, trestle_root, verbose). It goes beyond restatement by explaining the interaction rule that `name` defaults to `output` and must be supplied for a new output name.

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 files of controls into a component-definition json file', and frames it as the return leg of a round trip with trestle_author_component_generate. An agent can distinguish it from catalog-assemble and 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 explicit positive cases ('Write the implementation prose I edited back', 'bump its version'), a negative case ('Don't use when the markdown directory was not produced by component-generate'), and contrasts behavior with the catalog-assemble and profile-assemble siblings on the set-parameters flag and source-model resolution.

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