Skip to main content
Glama
io.github.mifsopo1/mifblender

io.github.mifsopo1/mifblender

run_python

Execute Python code or a .py file inside a running Blender session using bpy, bmesh and math, then retrieve stdout, stderr and any assigned result value.

Instructions

Run Python in Blender (bpy, bmesh, math imported): code or a .py file; stdout, stderr and any result you assign come back.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_python"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoblender
codeNo
fileNo
return_localsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

B3.2/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 and does disclose the useful specifics: the pre-imported modules and the fact that stdout, stderr and a user-assigned `result` are returned. It says nothing about what arbitrary code can mutate in the Blender session, execution limits, or error behavior, which matters for an unrestricted 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence with no filler, and the environment details are front-loaded ahead of the input/output note. The parenthetical and semicolon make it slightly run-on but nothing 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?

No output schema and no annotations, so the description does well to state the return channels. It is still incomplete for a four-parameter arbitrary-execution tool: `app` and `return_locals` are opaque, and there is no hint about the tool's effect on Blender state.

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 coverage is 0%, so the description must explain all four parameters itself. It covers `code` and `file` as alternatives and hints at the `result` return convention, but never mentions `app` (default 'blender', with no enum) or `return_locals`, leaving two parameters — including one whose name suggests meaningful output control — unexplained.

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 verb 'Run' and resource 'Python in Blender' are specific, and the parenthetical pre-imported modules (bpy, bmesh, math) tell the agent exactly what environment the code lands in. It doesn't name a sibling to differentiate against, but with siblings like find_tools and mif_call the purpose is unambiguous on its own.

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?

'code or a .py file' gives the agent the two mutually exclusive input modes, which is implicit usage guidance. There is no statement of when to prefer this over other tools, no preconditions, and no warning about side effects on the Blender scene.

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

Deploy Server

Other Tools