CLO Atelier
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CLO_APP_PATH | No | Where to find CLO's API stubs if not auto-detected. | |
| CLO_MCP_PORT | No | First port to try for the bridge (default 9877; tries the next 9 if busy). | |
| CLO_API_STUBS | No | Where to find CLO's API stubs if not auto-detected. | |
| CLO_MCP_HISTORY | No | Set to 0 to switch the undo history off. | |
| CLO_MCP_STATE_FILE | No | Location of the bridge state file (default ~/.clo-mcp/bridge.json). | |
| CLO_MCP_HISTORY_SIZE | No | Number of changes to keep in undo history (default 25). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Controls a running CLO 3D session through its embedded Python API. The bridge script must be running inside CLO: the user opens Edit > Python Script, pastes exec(open(r"/root/.clo-mcp/clo_mcp_bridge.py").read()) and presses Run. Call clo_status first.
Conventions: patterns, lines, fabrics and colorways use zero-based indices. Lengths are millimetres. Pattern coordinates are absolute positions in the 2D window with Y pointing up. Outline line N runs from point N to point N+1.
Building a garment: 1) clo_open_file an avatar (.avt) if the scene has none. 2) clo_create_patterns for all pieces in one call, each with its own area of the 2D window and an arrangement_point so it starts near the right body part. 3) clo_sew all seams in one call. 4) clo_add_fabric. 5) clo_simulate. 6) clo_screenshot with several views, including 2d-patterns, to check the result. Sewing direction: two sewn lines must run the same way along the seam. If a seam is twisted after simulation, flip direction_b on that seam.
Anything the dedicated tools do not cover: clo_search_api to find the function, then clo_execute_python to call it. Undo: every tool call that changes the project is recorded, so clo_undo steps back through them and clo_redo forward; clo_history lists them and can label a checkpoint to return to. The history holds the garment, not the avatar or scene, so export a .zprj before clo_new_project or opening another project. Some API calls open dialogs in CLO, which block every further request until the user closes them; pass an ApiTypes options struct where an overload takes one to avoid the dialog.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| clo_statusA | Check that CLO is running with the bridge loaded. Returns CLO version, open project, and counts of patterns, fabrics, colorways and avatars. Call this first. |
| clo_get_sceneA | Summarise the open project in one call: every pattern piece (index, name, fabric, centre position, size, arrangement point, seam groups), fabrics, colorways, avatars and simulation quality. Use clo_get_patterns for outline points and line indices. |
| clo_get_patternsA | Outline geometry for one or more pattern pieces: points (mm), outline lines with index, length and whether curved, plus fabric, grain, layer, mesh particle distance, arrangement and seam groups. Use it to find line indices and matching lengths before sewing. Omit pattern_indices for every piece. |
| clo_list_arrangement_pointsA | List the arrangement points around the loaded avatar (index and name), which place pattern pieces near a body part before simulation. Returns nothing if no avatar is loaded. |
| clo_create_patternsA | Draw one or more new pattern pieces from ordered outline points (each outline closes back to its first point). Create all pieces of a garment in one call. Coordinates are absolute positions in the 2D window, so give each piece its own area or they overlap. Returns each new piece's index and its outline lines (index, length), ready for clo_sew. |
| clo_add_internal_shapeB | Draw an internal line or closed internal shape (dart, fold line, pocket placement, cut-out guide) inside an existing pattern piece. |
| clo_edit_patternA | Change properties of an existing pattern piece. Set only the fields you want changed: rename, move in the 2D window, flip, re-place on the avatar, change fabric, layer, grain, mesh density, or freeze/hide it in 3D. |
| clo_copy_patternA | Duplicate a pattern piece, placing the copy's centre at a position in the 2D window. Optionally mirror the copy, e.g. to make a right sleeve from a left one. Returns the new piece's index. |
| clo_delete_patternsA | Delete pattern pieces, along with their seams. Cannot be undone. Remaining pieces are renumbered, so re-read indices with clo_get_scene afterwards. |
| clo_sewA | Create seams, each joining an outline line on one piece to an outline line on another (or the same) piece. Pass every seam of the garment in one call. Get line indices from clo_create_patterns or clo_get_patterns. The two lines are joined start-to-start by default; set direction_b false when line B runs the opposite way along the seam, otherwise the seam twists. |
| clo_simulateA | Simulate the garment for a number of steps. CLO is busy until it finishes; follow with clo_screenshot to see the result. Around 100-200 steps settles a simple garment. |
| clo_screenshotA | Capture images of the scene so you can see it. Ask for several views in one call. 3D views other than |
| clo_add_fabricA | Load a fabric file (.zfab, .jfab) into the project's fabric list and optionally assign it to pattern pieces. CLO's bundled fabrics are in ~/Documents/clo/CLO Assets/Fabric (denim, jersey knits, organza, velvet, ...). |
| clo_assign_fabricB | Apply a fabric already in the project to pattern pieces. |
| clo_get_fabricB | Properties of one fabric in the project: name, material and physical information, width, base colour and texture paths. |
| clo_edit_fabricA | Change a fabric in the project: rename it, set its base colour (tints any texture), or replace it with a different fabric file while keeping its assignments. Set only the fields you want changed. |
| clo_colorwaysA | List the project's colorways, and optionally add one by copying, rename one, or switch the active one. With no arguments it only lists. Operations run in the order copy, rename, switch. |
| clo_new_projectA | Clear the current garment and start a new one. Unsaved work is lost; export a .zprj first if it matters. |
| clo_open_fileA | Open a file in CLO by path. A project (.zprj) replaces the current scene, discarding unsaved work. Avatars (.avt), garments (.zpac), fabrics (.zfab), DXF patterns, OBJ/FBX/glTF meshes and other supported formats are added to it using CLO's defaults. Bundled avatars are in ~/Documents/clo/CLO Assets/Avatar. |
| clo_exportA | Write the current work to disk, overwriting any file at that path. zprj saves the whole project; zpac the garment only; obj/fbx/glb/gltf the 3D mesh; dxf the 2D patterns; pattern-json CLO's pattern data; techpack a .json with images alongside; turntable a rotating image sequence (give a .png path); avatar an .avt. |
| clo_undoA | Undo the last tool call that changed the project, or several, by restoring the garment as it was before. Works for everything the tools change, including simulation, moves and deletions: patterns, seams, fabrics, colorways and the 3D drape all come back. It also discards anything the user changed by hand in CLO since that point (clo_redo brings it back). The avatar and scene are not part of the history. Restoring resets the list in CLO's own History panel. |
| clo_redoA | Reapply changes that clo_undo just undid. Only available until the next tool call that changes the project. |
| clo_historyA | List the changes that can be undone or redone, newest first, with the tool call that made each. Pass checkpoint to mark the current state with a label (for example before trying a design variation), so clo_undo can return to it by name. History covers this CLO launch and keeps the most recent 25 changes. |
| clo_search_apiA | Search CLO's Python API reference (read from the installed CLO application) by keyword. Returns matching function signatures with their documentation, and matching option struct types. Works without CLO running. |
| clo_execute_pythonA | Run Python inside CLO on its main thread, for anything the other tools do not cover. In scope: utility_api, pattern_api, fabric_api, import_api, export_api, rest_api, ApiTypes (option structs such as ApiTypes.ImportExportOption()), json and os. Variables persist between calls. Returns the value of the last expression, or of a variable named |
| clo_stop_bridgeA | Stop the bridge script inside CLO. The other tools stop working until the user runs the bridge script again, so only call this when the user asks. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 26 tools
Most tools map to a single distinct resource+action, and the descriptions actively steer the agent (clo_get_scene vs clo_get_patterns, clo_add_fabric vs clo_assign_fabric, clo_undo/redo/history). The main soft spots are clo_open_file, which can also add fabrics/avatars that clo_add_fabric handles, and clo_colorways, which bundles list/copy/rename/switch into one tool, but both are explained well enough to avoid misselection.
Nearly all tools use a consistent clo_verb_noun snake_case pattern with a clear domain prefix. Deviations are minor: noun-only names like clo_status, clo_export, clo_colorways, clo_history, and singular/plural drift (clo_edit_pattern vs clo_get_patterns/clo_delete_patterns).
26 tools is on the heavy side of the scale, though a full 3D garment CAD application genuinely has many distinct operations. A few clusters (three fabric tools, three undo/history tools, four project/file tools) push past the comfortable 3-15 range and make the surface harder to hold in mind.
Coverage is strong: pattern creation, geometry readback, editing, copying and deletion, sewing, simulation, screenshots, fabric and colorway management, project/file lifecycle, export, and history, plus clo_execute_python and clo_search_api as an escape hatch. Minor gaps remain, e.g. no way to remove or inspect an individual seam without deleting a whole pattern piece, and avatar management is only reachable indirectly through clo_open_file.