Skip to main content
Glama

exec_python

Runs arbitrary Python inside Blender with bpy, math, Vector, and Euler available. Use it as an escape hatch for tasks the other Blender tools do not cover, assigning to result to return a value.

Instructions

Run arbitrary Python inside Blender (bpy, math, Vector, Euler available). Assign to result to return a value. The escape hatch for anything the other tools do not cover. Runs with the full authority of the Blender process.

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>"
    },
    "name": "exec_python"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does substantial work: it names the available environment (bpy, math, Vector, Euler), explains the return convention (assign to `result`), and warns that code runs with 'the full authority of the Blender process' — a meaningful risk disclosure. It omits sandboxing, timeout, and error/undo behavior, so not fully complete.

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 compact sentences with the core action front-loaded and the escape-hatch role plus return convention following. No filler; every sentence earns its place.

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 code-execution tool with no annotations or output schema, it covers environment, return mechanism, and authority/risk adequately. It could add error handling and execution constraints to be fully complete.

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 coverage is 0%, so the description must compensate. It explains that the `code` argument is Python with bpy/math/Vector/Euler available and documents the `result` return convention, which the bare schema lacks entirely.

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 arbitrary Python inside Blender.' It also positions itself against all siblings as 'the escape hatch for anything the other tools do not cover,' so an agent can immediately tell this is the general-purpose fallback rather than a specialized action.

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 a clear condition for use: when the other tools do not cover the task. It stops short of explicit when-not-to-use guidance or naming specific alternatives to prefer, so it's strong context but not a full routing rule.

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