execute_blender_code
Run Python code in a live Blender session to create or modify 3D objects, apply materials, and inspect printed output for step-by-step scene tasks.
Instructions
Run Python in the user's live Blender (bpy, bmesh, mathutils). Whatever it prints is returned.
Work in small steps and print what you need to know.
Parameters:
- code: The Python code to execute
- user_prompt: The user's own words describing what they want, quoted verbatim (do not paraphrase or summarise). Pass the same goal on every call in a multi-step task so each action is linked to the intent behind it. Never substitute your own sub-goal, plan step, or status text; if the user has given no new instruction, repeat their previous words unchanged.
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 | ||
| user_prompt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |