Skip to main content
Glama

blender_run_script

Execute custom Python code in a persistent headless Blender session to automate 3D modeling, rendering, and print preparation; assign the result variable to return JSON.

Instructions

Execute custom Python (bpy, bmesh, mathutils, np, C, D) inside the persistent headless Blender session; assign result to return JSON.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "blender_run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo
fileNoOptional path to a .py script file.
timeout_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.5/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 two meaningful traits: the session is persistent (state carries across calls) and results are returned by assigning `result` to a JSON-serializable value. It says nothing about error/exception behavior, what happens when `timeout_s` is exceeded, whether partial mutations persist after a failure, or the fact that this executes arbitrary code with full Blender privileges.

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

Conciseness5/5

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

A single dense sentence with zero filler: the environment, the available modules, and the return mechanism are all front-loaded and each clause carries distinct information. Nothing could be removed without losing meaningful content.

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 an arbitrary-code-execution tool with no annotations and no output schema, the definition covers execution context and result retrieval but omits failure modes, timeout semantics, and `code`/`file` interaction — gaps an agent would hit on its first ambiguous call. Adequate but not sufficient for the tool's risk profile.

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 low (33%: only `file` is documented in the schema), so the description must compensate. It adds real value for `code` by naming the injected namespaces (`bpy`, `bmesh`, `mathutils`, `np`, `C`, `D`) and the `result` return convention, but leaves `timeout_s` entirely undefined and never states precedence or conflict rules when both `code` and `file` are supplied.

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

Purpose4/5

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

Uses a specific verb ('Execute') and a specific resource ('custom Python') scoped to a 'persistent headless Blender session', which immediately separates it from the many task-specific siblings (blender_decimate, blender_boolean, etc.). It doesn't explicitly name a sibling or state that it is the escape hatch for arbitrary scripting, so it stops short of a 5.

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?

Usage is implied rather than stated: the phrase 'custom Python' signals this is for logic not covered by the other tools, but there are no explicit when-to-use/when-not conditions and no guidance on preferring a built-in tool over hand-written code. It also gives no hint about choosing between the `code` and `file` inputs.

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