Skip to main content
Glama

execute_python

Run custom Python inside Blender to handle tasks the dedicated tools don't cover, such as geometry nodes, drivers, particles, bmesh work, and animation.

Instructions

Escape hatch for anything the dedicated tools don't cover (geometry nodes, drivers, particles, custom bmesh work, animation). Prefer the dedicated tools - they carry the quality defaults.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython run inside Blender. Available: bpy, bmesh, math, mathutils, Vector, Matrix, np, C (context), D (data), roxy (roxy.call('tool_name', **params) runs any Roxy tool). print() output is returned; set a variable named result to return a value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the key tradeoff (dedicated tools 'carry the quality defaults', implying this one does not) but says nothing about the code running with full scene access, mutability, irreversibility, or error behavior. Useful but incomplete for an arbitrary-code-execution tool.

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?

Two tightly packed sentences: purpose and scope first, then the preference rule. Zero filler, front-loaded, and the parenthetical examples earn their space.

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?

For a single-parameter tool with no output schema and a schema that already describes the execution environment and return mechanics, the description covers purpose and selection adequately. The remaining gap is execution risk/side-effect disclosure, which is minor but real for an arbitrary-code tool.

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 100%, and the schema already documents the environment and output mechanics (bpy, bmesh, roxy, print/result). The description adds no parameter-level detail beyond that, so the baseline of 3 applies.

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 frames the tool as an 'escape hatch' for 'anything the dedicated tools don't cover' and names concrete use cases (geometry nodes, drivers, particles, bmesh, animation). It clearly distinguishes this from the many dedicated siblings, though the literal verb+resource (run Python) is carried by the name and schema rather than the description text.

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?

It gives an explicit when-to-use ('anything the dedicated tools don't cover') and an explicit when-not ('Prefer the dedicated tools'), naming the reason (quality defaults). This is exactly the routing guidance an agent needs and leaves no ambiguity about choosing this over a dedicated tool.

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