Skip to main content
Glama

run_python

Execute Python inside Blender with bpy, bmesh, mathutils, and NumPy; get stdout plus added, changed, and removed objects with world sizes to catch silent modeling mistakes.

Instructions

Run Python in Blender (bpy, bmesh, mathutils, Vector, np, math are ready). Returns stdout, and the added, changed and removed objects with their world sizes, so silent mistakes show up. Prefer the other tools for moving, sizing and checking. With session the variables, functions and imports stay between calls under that name (reset=true clears them; rollback clears all sessions). paths are folders added to the import path: keep your helper modules there and import them once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
pathsNo
resetNo
sessionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does substantial work: it discloses the return payload (stdout plus added/changed/removed objects with world sizes), the persistence model of `session`, the clearing effect of reset=true, the fact that rollback wipes all sessions, and how `paths` feeds the import path. It stops short of warning about the risks of arbitrary code execution (undo behavior, timeouts, failure/crash semantics), which is the one meaningful gap for a tool that runs unrestricted code.

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?

Front-loaded with the tool's action and runtime, then return value, then routing advice, then parameter semantics. Every sentence carries information, though the parenthetical import list and the compressed session/rollback clauses are dense enough to read as crammed rather than crisp.

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?

With no output schema and no annotations, the description correctly supplies the return shape and the session lifecycle, which are the two things an agent cannot infer from the input schema. It leaves execution limits, error behavior, and reversibility unstated, which matters for arbitrary code execution, but the core call-time information is present.

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?

Schema description coverage is 0%, so the description must compensate, and it explains the three non-obvious parameters: `session` (namespace persistence between calls), `reset` (clears that session), and `paths` (folders added to import path, intended for helper modules). `code` is self-evident by name. Format-level detail for each parameter is thin, keeping it off a 5.

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 ('Run Python in Blender') and names the exact runtime surface available (bpy, bmesh, mathutils, Vector, np, math). It further distinguishes itself from the large sibling set by saying 'Prefer the other tools for moving, sizing and checking', so an agent can place it as the escape-hatch tool.

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?

Gives clear routing guidance: fall back to the dedicated scene tools for moving, sizing and checking rather than scripting those operations. It does not state when run_python is the right choice in positive terms beyond being the general fallback, and mentions no prerequisites, but the alternative-avoidance rule is explicit and actionable.

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