Skip to main content
Glama
Show2Instruct

Bonsai MCP

execute_blender_code

Destructive

Run Python code inside Blender to automate viewport manipulation, rendering, object transforms, and modifiers using bpy.

Instructions

[EDIT] Run arbitrary Python code inside Blender with full bpy access. Use ONLY when you need Blender-specific operations (viewport manipulation, rendering, object transforms, modifiers). For IFC/BIM data operations, ALWAYS prefer execute_ifc_code. LOCAL TRUSTED USE ONLY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source to execute.
Behavior4/5

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

Annotations already indicate destructive hint and non-read-only. Description adds '[EDIT]' prefix and 'LOCAL TRUSTED USE ONLY' to emphasize mutability and security. Could elaborate on potential destructive actions, but overall transparent.

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?

Extremely concise: two sentences pack purpose, usage constraints, and security warning. No redundant words. Front-loaded with key verb 'Execute.'

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?

For a single-parameter tool with annotations, the description fully covers the context: what it does, when to use, alternative, and trust implication. No gaps remain.

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?

Only one parameter 'code' with 100% schema coverage. Description says 'Python source to execute.' which adds context beyond the schema's 'Python source.' It conveys the execution nature clearly.

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 tool's purpose: 'Run arbitrary Python code inside Blender with full bpy access.' It distinguishes from the sibling tool execute_ifc_code by specifying when to use each, ensuring no ambiguity.

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?

Explicit usage guidance is provided: 'Use ONLY when you need Blender-specific operations' and 'For IFC/BIM data operations, ALWAYS prefer execute_ifc_code.' Also adds security context with 'LOCAL TRUSTED USE ONLY.'

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/Show2Instruct/bonsai-mcp'

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