execute_blender_code
Run custom Python code in Blender with full bpy and bmesh access, enabling advanced automation beyond standard tools. Use for tasks requiring direct scripting control.
Instructions
Execute arbitrary Python code in Blender with full bpy access.
WARNING: This runs unvalidated code. Use structured tools when possible. Code is executed in a sandboxed environment with restricted builtins.
Args: code: Python code to execute. Has access to 'bpy' and 'bmesh'.
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 |