preview_decorated_mesh
Render an interactive 3D preview of a mid-print decorated part, with orbit and zoom controls plus a PNG snapshot, so you can inspect the decoration before printing.
Instructions
Render a 3D preview of a mid-print decorated part (Pro). Opens Kiln's interactive inline 3D stage on the result (orbit/zoom panel in MCP Apps hosts; hosted sessions add a browser stage link).
INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "preview_decorated_mesh"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | Filament colour for the render (hex). Defaults to white. Default: "#FFFFFF". | |
| width | No | Render width in pixels. Default 800. Default: 800. | |
| height | No | Render height in pixels. Default 600. Default: 600. | |
| depth_mm | No | Deboss depth in mm, (0, 5] (default 0.8). Default: 0.8. | |
| decoration | No | Override the provenance-derived decoration spec. v1 supports "kiln"; other specs surface DECORATION_NOT_SUPPORTED with the allow-list. Default: "kiln". | |
| output_dir | No | Directory for the rendered PNGs + decorated STL. Empty = a fresh kiln_preview_stl_* tempdir. A named folder must be new or empty (``OUTPUT_EXISTS`` otherwise): the files have fixed names, so an earlier preview there is never written over. Default: "". | |
| session_id | No | Session key from decorate_during_print. Resolved against the engine's persistent root + legacy tempdir fallbacks. Provenance sidecar supplies decoration spec + depth if not overridden. Default: "". | |
| image_scale | No | Decoration size as a fraction of the part's shorter top-face axis. Default 0.6. Default: 0.6. | |
| engine_output_dir | No | Direct path to session dir. Higher priority than session_id. Default: "". | |
| source_gcode_path | No | Explicit path to the pre-carve source gcode used to derive the part's XY bounds. When omitted and a session is given, the engine's carved gcode is used (its XY envelope equals the source's — the carver never adds new XY). Default: "". |