Assemble Component Definition from Markdown
trestle_author_component_assembleAssemble 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
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |