Skip to main content
Glama

blender_execute

Runs Blender Python scripts live in the GUI or headlessly to create and edit 3D models, modifiers, shaders, lighting, and animation, then save .blend files or export common 3D formats.

Instructions

Execute Blender Python (bpy/bmesh/mathutils) 3D modeling, modifier, shader, lighting, or animation scripts either LIVE inside the open Blender GUI (via Live Bridge) or HEADLESSLY (Blender --background). Supports saving .blend and exporting .glb/.gltf/.obj/.stl/.fbx/.usdz.

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": "blender_execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesPython code using bpy, bmesh, mathutils, math. Assign `result = ...` to return structured data.
modeNoauto
portNo
save_asNoOptional output .blend file path.
blend_fileNoInput .blend file (for headless edits on an existing file).
export_pathNoOptional 3D export path (.glb, .gltf, .obj, .stl, .fbx, .usdz).
timeout_secNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose the important behavioral facts: code runs either inside the open GUI session or in a background process, and results can be persisted via .blend saving or 3D export. It omits the risk profile an agent most needs for arbitrary code execution — that this can mutate or destroy the current scene, what happens on error/timeout, and whether live mode requires an active bridge connection.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences with the core action and execution-mode distinction front-loaded, followed by persistence capabilities. The parenthetical format lists are informative rather than filler, though the description is packed tightly enough that the mode explanation and export list compete for attention.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter arbitrary-code-execution tool with no annotations and no output schema, the description covers the two execution modes and output persistence but leaves key operational gaps: error/timeout behavior, whether the code runs against the current scene or a fresh one, and how the `result` variable is surfaced. It is adequate to start but not complete for a tool of this risk level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 57%, leaving mode, port, and timeout_sec undocumented in the schema. The description partially compensates by explaining the live-vs-headless meaning of `mode` and by naming the save/export outputs that map to save_as and export_path, but it says nothing about `port` (only implied by 'Live Bridge'), `timeout_sec`, or the `blend_file` input for editing existing files.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Execute) plus the exact resource (Blender Python via bpy/bmesh/mathutils) and enumerates the domains it covers: modeling, modifiers, shaders, lighting, animation. An agent can immediately distinguish this from siblings like blender_inspect_scene, blender_render_preview, or blender_status, which are read/preview/status operations rather than arbitrary script execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives real mode-selection context by contrasting LIVE execution through the Live Bridge against HEADLESS `Blender --background`, which is the primary usage decision for this tool. However, it never says when to prefer a sibling such as blender_inspect_scene for reading scene state, nor does it state prerequisites (e.g. Blender must already be running for live mode, or use blender_launch first).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.