clo_run_python
Run Python scripts in CLO3D with pre-imported CLO APIs to inspect, edit patterns, manage fabrics, and automate 3D garment tasks.
Instructions
Run Python inside CLO with the CLO API modules pre-imported (import_api, export_api, fabric_api, pattern_api,
utility_api, rest_api, ApiTypes). A single expression returns its value; otherwise assign to result.
stdout is captured. Coordinates: mm, Y up. Example: pattern_api.GetPatternCount()
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": {
"code": "<code>"
},
"name": "clo_run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout_seconds | No |