Run Script
run_scriptExecute a .py file in Blender with arguments to build models from scripts, returning stdout, stderr, and added, removed, or changed objects.
Instructions
Run a .py file in Blender as run_python does, with args; its folder, and parents up to a blenderlens.toml, are importable afresh each run. Returns: result, stdout, stderr, objects added, removed, changed. WHEN TO CALL: to build a model from its script.
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": {
"path": "<path>"
},
"name": "run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | The script's args | |
| path | Yes | .py file | |
| fresh | No | Start from an empty file | |
| discard | No | Allow losing unsaved changes | |
| timeout | No | Seconds (120) |