execute_code
Run Python code in Blender with preloaded modules like bpy, bmesh, and mathutils, and retrieve a variable's value via return_var for scripting and automation tasks.
Instructions
在 Blender 里执行任意 Python(预置 bpy/bmesh/mathutils/Vector/math)。返回 stdout;return_var 指定要取回的变量名。
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_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| return_var | No |