Skip to main content
Glama

execute_blender_code

Destructive

Runs trusted Python code on Blender's main thread for a session confirmed by blender_health, enabling scene automation, inspection, and rendering.

Instructions

Run trusted Python on Blender's main thread for the session confirmed by blender_health.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>",
      "expected_session": "<expected_session>"
    },
    "name": "execute_blender_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
timeoutNo
expected_sessionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the agent knows this is a mutating, non-repeatable operation. The description adds real context by implying that arbitrary trusted code runs unsandboxed on the main thread, and that session identity matters, but it never says what gets destroyed, whether a failure leaves the scene half-mutated, or what happens when the timeout fires.

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?

A single front-loaded sentence with no filler; the execution context is established immediately. It could be longer without hurting, but nothing present is wasted.

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?

An output schema exists, so return values need not be explained. However, this is an arbitrary-code-execution tool with destructive annotations and zero per-parameter documentation; missing timeout semantics and missing guidance about preferring scoped sibling tools leave meaningful gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across three parameters. The description gives meaning only for expected_session (the session confirmed by blender_health); it says nothing about what shape the code parameter takes or what the timeout parameter controls. That is partial compensation, but the timeout behavior is the most consequential undocumented parameter for a destructive call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ("Run trusted Python") and a specific execution context ("on Blender's main thread"). This implicitly distinguishes it from the sibling execute_blender_code_for_cli, but it never names that alternative, so the differentiation is left to inference.

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

Usage Guidelines3/5

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

"for the session confirmed by blender_health" implies the prerequisite workflow: call blender_health first and pass the confirmed session. Beyond that prerequisite, there is no guidance on when to prefer this tool over the CLI variant or over the many purpose-built sibling tools (e.g., apply_elbow_edit), which are safer, scoped options for their own tasks.

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