Skip to main content
Glama
Ref2Blender MCP Server

Ref2Blender MCP Server

by evarynstudio

execute_blender_code

Run Python code in a live Blender session to automate scene edits and retrieve printed output, tracebacks, and object dimension/triangle summaries.

Instructions

Run Python code in the user's Blender session (main thread, Object Mode).

Returns what the code printed, the traceback if it raised, and a summary of the objects in the Ref2Blender collection with dimensions and triangle counts. The namespace persists between calls.

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

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses the execution context (main thread, Object Mode), state persistence of the namespace across calls, and what comes back on failure (traceback). What it omits is the risk profile of arbitrary code execution — that the code can modify or delete scene data — and any limits on captured output size.

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?

The description is short and front-loaded, leading with the verb and execution context before return behavior. Every sentence carries information; the only mild redundancy is summarizing return values when an output schema already exists.

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, the definition is adequate but thin: it should say whether the code can mutate the scene, whether it is sandboxed, and whether printed output is truncated. Since an output schema exists, the return-value sentence is helpful but not strictly required, and the missing safety/mutation context is the real gap.

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 description coverage is 0% for the single `code` parameter, so the description is the only signal. It establishes that the value is Python source executed in a persistent namespace, but adds nothing about accepted constructs, imports, or formatting, leaving the parameter only minimally characterized beyond its name.

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?

States a specific verb and resource: run Python code in the user's Blender session, with execution context (main thread, Object Mode). It is unambiguous what the tool does, but it never contrasts itself with the more targeted siblings such as scene_summary, check_model, or render_views, so an agent must infer that this is the general-purpose scripting escape hatch.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says to prefer scene_summary or check_model for read-only inspection and fall back to this tool only for arbitrary scripting. There is also no warning about when not to use it, e.g. that arbitrary code can mutate or destroy the scene.

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