run_python
Execute Python code inside Cascadeur’s GUI thread to access csc, app, scene, view_scene, and ui; returns stdout and the value of an expression or result variable.
Instructions
Run Python inside Cascadeur on the GUI thread with csc, app, scene (domain scene), view_scene and ui in scope. Returns stdout and the value of a lone expression or of a variable named result. scene.modify*/edit return False when their callback failed; check it.
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": "run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout | No | Seconds to wait (default 60, max 600). |