blender_run_python
Execute Python code inside a live Blender session with bpy available, returning stdout for automation, scripted edits, and scene inspection.
Instructions
Run Python inside Blender (bpy available). The reply is the code's stdout: use print().
Executes arbitrary code in the user's Blender session. Keep edits reproducible: record meaningful changes in your build scripts, not only in the live scene.
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": "blender_run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout | No |