Skip to main content
Glama

execute_python

Run Python in a persistent Blender session to script modeling, inspect scenes, render, and return JSON-serializable results with full bpy access.

Instructions

Queue arbitrary Python in persistent Blender. Full bpy and remote OS access.

Assign a JSON-serializable value to result. Variables are per call; bpy scene state persists. Successful calls save a checkpoint by default. A timeout or running-job cancellation restarts Blender and loses unsaved changes.

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": {
      "session_id": "<session_id>",
      "code": "<code>"
    },
    "name": "execute_python"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
checkpointNo
session_idYes
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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, and it does substantial work: it discloses full bpy and OS-level access, the `result` assignment convention, that variables are per-call while scene state persists, that successful calls checkpoint by default, and that a timeout or cancellation restarts Blender and loses unsaved changes. That is an unusually candid warning about a destructive side effect. It still omits how errors, stdout, or the returned `result` surface to the caller.

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?

Four short sentences, front-loaded with purpose and capability, then the state/persistence model, then the failure mode. No filler. Formatting is slightly fragmented by the line breaks but the information order is sound.

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?

For an arbitrary-code-execution tool with zero annotations, no output schema, and 0% schema coverage, the description covers the dangerous parts well but leaves the calling contract thin: no return shape beyond the `result` hint, no error semantics, no explanation of `session_id` lifecycle or how it relates to create_session/list_sessions. Just adequate for a tool of this complexity.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate for four bare parameters. It covers `checkpoint` (default on for successful calls) and gestures at `timeout_seconds` (timeout restarts Blender), but never names units, the 1-3600 boundary, or what `session_id` selects. An agent can guess, but the gap is real.

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: 'Queue arbitrary Python in persistent Blender' with 'Full bpy and remote OS access'. That is enough for an agent to tell this apart from a sibling like run_operator or describe_api, since it clearly executes free-form code rather than a named operator or introspection call. It stops short of naming that distinction explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance: nothing says to prefer run_operator for built-in operators or inspect_* for read-only queries. The agent must infer the niche from the word 'arbitrary'. The only conditional language concerns timeout and cancellation consequences, not tool selection.

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