execute_blender_code_for_cli
Run Python code in a background Blender process by opening a specified .blend file and executing bpy scripts, then return structured data by assigning a dict to result.
Instructions
Execute Python code in a background Blender process.
Opens blend_file with blender --background and runs code.
Assign a dict to result to return data.
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": {
"blend_file": "<blend_file>",
"code": "<code>"
},
"name": "execute_blender_code_for_cli"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| blend_file | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||