Skip to main content
Glama

run_script

Execute Python code using Blender's bpy API to build, modify, or query .blend files. Supports live interaction with an open Blender window or headless automated runs.

Instructions

Run Python against Blender's bpy API.

bpy, mathutils, math, D and C are pre-bound. Assign to result or call emit(value) to send data back; print() output is captured too.

Args: code: The Python to execute. blend_file: Open this .blend first. Supplying it forces a headless run. save_as: Save the file here when the script finishes. target: "auto", "live" or "headless".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
targetNoauto
save_asNo
blend_fileNo
Behavior3/5

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

The description discloses moderate behavioral details: pre-bound variables (bpy, mathutils, etc.), data return via 'result' or 'emit()', and print capture. It also notes that 'blend_file' forces headless mode. However, it omits warnings about potential destructive side effects (since arbitrary code can modify the scene) and does not discuss error handling, which is important for a script execution tool with no annotations.

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?

The description is concise: three sentences for purpose and behavior, then a compact parameter list. Every sentence serves a purpose—intent, execution context, return mechanism, parameter details. No wasted words.

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?

Given that this is a powerful arbitrary-code execution tool with no output schema and 15 siblings, the description is missing key elements: error handling, execution timeout/limits, any prerequisites (e.g., Blender must be installed), and when NOT to use it (e.g., for simple tasks better handled by specialized tools). It covers the immediate workflow but lacks safety and boundary context.

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

Parameters5/5

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

The input schema has 0% description coverage (no per-parameter descriptions), but the tool description provides clear explanations for all four parameters: 'code' (the Python to execute), 'blend_file' (open first, forces headless), 'save_as' (save after run), and 'target' (auto/live/headless). This fully compensates for the schema's lack of documentation, adding essential semantic value.

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?

The description starts with 'Run Python against Blender's bpy API', which uses a specific verb and resource combination. This clearly distinguishes it from sibling tools like 'apply_material', 'render', or 'blender_status', which are task-specific rather than general-purpose scripting.

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?

No explicit guidance on when to use this tool versus alternatives is provided. With 15 sibling tools performing specific tasks (e.g., 'apply_material', 'render'), the description should advise when to pick this dynamic script runner instead of a specialized tool, but it does not.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/josefgoeller-ship-it/blender-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server