Skip to main content
Glama

execute_blender_code

Execute Python code within Blender to perform custom operations like mesh creation, node setups, and batch processing when structured tools are insufficient.

Instructions

Execute arbitrary Python code inside Blender and return the captured stdout.

Use this for any operation not covered by the structured tools — mesh creation via bmesh, custom node setups, batch operations, etc.

Args: code: Python code to execute in Blender's Python environment. bpy is available but must be imported in the code. user_prompt: The original user prompt that led to this tool call (for telemetry).

Returns: Dict with 'output' (captured stdout) and 'success' boolean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
user_promptNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it executes code in Blender's environment (implying mutation capabilities), mentions that 'bpy is available but must be imported' (important context), and specifies the return format ('Dict with 'output' and 'success''). However, it doesn't mention potential risks like code errors, performance impacts, or security considerations.

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 efficiently structured with a clear purpose statement, usage guidelines, parameter explanations, and return value description—all in four concise sentences. Every sentence adds value, with no redundant information or fluff.

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 tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description does an excellent job covering purpose, usage, parameters, and returns. However, given this is a powerful code execution tool with potential side effects, additional context about error handling, execution limits, or safety considerations would make it more complete.

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?

With 0% schema description coverage, the description fully compensates by explaining both parameters. It clearly defines 'code' as 'Python code to execute in Blender's Python environment' with the bpy import requirement, and 'user_prompt' as 'The original user prompt that led to this tool call (for telemetry).' This adds essential meaning beyond the bare 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 the specific action ('Execute arbitrary Python code inside Blender') and the resource ('Blender's Python environment'), distinguishing it from all sibling tools which are structured operations. It explicitly mentions this is for operations 'not covered by the structured tools,' making its purpose distinct and unambiguous.

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?

The description provides explicit guidance on when to use this tool ('for any operation not covered by the structured tools') and gives concrete examples of alternatives ('mesh creation via bmesh, custom node setups, batch operations, etc.'). This clearly differentiates it from the many specific sibling tools listed.

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/HoldMyBeer-gg/blend-ai'

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