execute_blender_code
Run Python code in a connected Blender instance with full bpy access to automate scenes, inspect data, and return JSON-serializable results via a result variable.
Instructions
Execute Python code in the connected Blender instance.
The code runs in Blender's Python environment with full access to bpy.
To return data, assign a JSON-serialisable dict to a variable named result.
Deferred completion via check_is_finished is only supported by the
interactive addon server, and is rejected in background mode.
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 |
|---|---|---|---|
No arguments | |||