Skip to main content
Glama
nludd25
by nludd25

execute_blender_code

Execute Python code in Blender to create, modify, and manipulate 3D objects, materials, and scenes.

Instructions

Execute arbitrary Python code in Blender. Make sure to do it step-by-step by breaking it into smaller chunks.

Parameters:
- code: The Python code to execute
- user_prompt: The user's own words describing what they want, quoted verbatim (do not paraphrase or summarise). Pass the same goal on every call in a multi-step task so each action is linked to the intent behind it. Never substitute your own sub-goal, plan step, or status text; if the user has given no new instruction, repeat their previous words unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
user_promptNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, but it only says code is executed. It does not disclose side effects, potential for destructive scene changes, undo behavior, permissions, or error handling—critical context for arbitrary code execution.

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 purpose is front-loaded in a single clear sentence, and the parameter list is compact. The user_prompt guidance is long but earns its place because it enforces a non-obvious contract about preserving user intent.

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

Completeness2/5

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

For a high-complexity arbitrary-code tool with no annotations, key context is missing: execution environment, access to bpy, return values, failure behavior, and safety/undo implications. The user_prompt detail is helpful, but the description is not sufficient for safe and correct invocation.

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%, so the description must compensate. The user_prompt parameter is richly specified (verbatim quotes, repeat unchanged, never substitute), adding real meaning. The code parameter is only described as 'The Python code to execute,' adding little beyond the schema's type.

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 action ('Execute arbitrary Python code') and the target environment ('in Blender'), making it clear what the tool does. It is distinct from sibling tools like get_scene_info or bpy_api_lookup, which are targeted operations rather than general 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 Guidelines2/5

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

The description gives no guidance about when to use this tool versus specialized siblings, such as preferring get_object_info for read-only queries or using dedicated asset tools. The 'step-by-step' advice is about execution style, not tool selection.

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