Skip to main content
Glama

execute_blender_code

Run custom Python code in Blender with full bpy and bmesh access, enabling advanced automation beyond standard tools. Use for tasks requiring direct scripting control.

Instructions

Execute arbitrary Python code in Blender with full bpy access.

WARNING: This runs unvalidated code. Use structured tools when possible. Code is executed in a sandboxed environment with restricted builtins.

Args: code: Python code to execute. Has access to 'bpy' and 'bmesh'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the unvalidated nature, sandboxed execution with 'restricted builtins', and full access to bpy/bmesh. It does not enumerate possible destructive effects, but the arbitrary-code warning inherently covers that risk.

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 description is compact and front-loaded with purpose, then a warning, then parameter detail. There is minor redundancy between 'full bpy access' and 'Has access to bpy and bmesh', but the text is otherwise efficient.

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?

Covers purpose, risk, execution environment, and parameter semantics adequately for a one-parameter escape-hatch tool. However, with no output schema present, it does not mention how results or errors are returned, which matters for an arbitrary code execution tool.

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?

The schema only says 'code' is a required string, so semantic weight falls on the description. It clarifies the value is 'Python code to execute' and specifies that it has access to 'bpy' and 'bmesh', adding meaning beyond the schema. It does not explain result-return behavior, but the parameter itself is well described.

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 verb and resource: 'Execute arbitrary Python code in Blender with full bpy access.' It is immediately clear this is the generic code-execution escape hatch, distinct from the many structured sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Explicitly says 'Use structured tools when possible' and warns the code 'runs unvalidated code', giving clear context for when to prefer alternatives. It does not name specific sibling tools or enumerate conditions, but the guidance is sufficient for an agent.

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

Deploy Server

Other Tools