Skip to main content
Glama
Aayushdubey101

Blender-MCP

blender_execute_python

Destructive

Run arbitrary Python code inside Blender to perform custom operations when no dedicated tool fits. Assign output to 'result' to retrieve data.

Instructions

Execute arbitrary Python code inside Blender (escape hatch for advanced ops).

The code runs with bpy already imported. To return data, assign it to a variable named result. Use this only when no dedicated tool fits.

DESTRUCTIVE: arbitrary code can modify or delete anything in the scene.

Args: params: ExecutePythonInput with the code string to execute (max 20,000 chars).

Returns: JSON with the value of result (if set) or a success confirmation.

Example: code = "result = [obj.name for obj in bpy.data.objects if obj.type == 'MESH']"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Adds context beyond the annotations by stating 'DESTRUCTIVE: arbitrary code can modify or delete anything in the scene' and explaining that `bpy` is pre-imported and data is returned via a `result` variable. These details go beyond the destructiveHint annotation.

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 well-structured with sections for purpose, usage, warning, args, returns, and example. It is concise, front-loaded, and every sentence contributes value without redundancy.

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

Completeness5/5

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

Given the tool's complexity as an arbitrary code execution escape hatch, the description covers execution context, return protocol, destructive warning, limits, and an example. This is sufficient for correct selection and invocation, especially with the sibling list and output schema as scaffolding.

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 describes the `code` parameter, but the tool description supplements it with the `result` return convention, the 20,000 character limit, and a concrete example. This adds meaningful semantics beyond the schema.

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 clearly states 'Execute arbitrary Python code inside Blender' with 'escape hatch for advanced ops', establishing a specific verb+resource. It distinguishes itself from sibling tools by framing it as a fallback for when dedicated tools do not apply.

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 says 'Use this only when no dedicated tool fits', providing direct when-to-use guidance and implicitly naming alternatives. The example further clarifies appropriate usage.

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/Aayushdubey101/Blender-MCP'

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