Skip to main content
Glama

execute_blender_python

Run custom Python inside Blender to handle lighting, node tweaks, animation, and other tasks outside dedicated tools; assign or print output to return results.

Instructions

Run Python inside Blender for anything the other tools do not cover (custom lighting, node tweaks, animation). Available names: bpy, mn (Molecular Nodes), mg (Molecular Nodes geometry nodes), get_molecule(name). Assign to result or print() to return output. Prefer the dedicated tools when they fit.

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_python"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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. It usefully discloses the available namespace (bpy, mn, mg, get_molecule) and the return convention ('Assign to result or print()'), which is real behavioral context. It omits the risk profile of arbitrary code execution: no mention of whether effects persist in the session, whether the call can destroy scene state, or what happens on error.

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?

Four short sentences, each doing distinct work: purpose, scope, available API, return mechanism, then the sibling preference. The escape-hatch framing and the 'prefer dedicated tools' caution are front-loaded where they matter most.

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

Completeness4/5

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

For a single-parameter escape-hatch tool with no output schema, the essentials are covered: what to write, what is in scope, and how to get output back. A note on error behavior or session persistence would close the remaining gap, but nothing needed to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 0% and the schema only says 'Code: string', so the description must compensate, and it largely does by enumerating the injected names and the output-capture convention. It does not constrain syntax or indicate whether errors surface as exceptions versus returned text.

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 and resource ('Run Python inside Blender') and immediately frames its scope as the escape hatch for what siblings cannot do, with concrete examples (custom lighting, node tweaks, animation). An agent can distinguish it from the twelve named siblings without opening any schema.

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

Usage Guidelines5/5

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

Explicitly gives both the when ('anything the other tools do not cover') and the when-not ('Prefer the dedicated tools when they fit'), which is exactly the routing decision an agent must make against siblings like add_style or set_background. Nothing is left to inference.

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