execute_blender_code
Run Python code in a live Blender session to automate scene edits and retrieve printed output, tracebacks, and object dimension/triangle summaries.
Instructions
Run Python code in the user's Blender session (main thread, Object Mode).
Returns what the code printed, the traceback if it raised, and a summary of the objects in the Ref2Blender collection with dimensions and triangle counts. The namespace persists between calls.
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": "execute_blender_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |