Skip to main content
Glama

max_run_python

Execute Python code directly inside an open Autodesk 3ds Max scene to query or modify objects, run pymxs scripts, and return expression results or printed output.

Instructions

Execute Python (Max's own 3.11 with pymxs) inside Max. rt (pymxs.runtime) and pymxs are predefined. A single expression returns its value; for multi-line code assign to result. print() output is returned too.

Input Schema

NameRequiredDescriptionDefault
codeYes
undoNo
timeoutNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

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 it does disclose genuinely useful behavior: predefined `rt`/`pymxs` globals, expression-vs-`result` return semantics, and captured print output. It says nothing about side effects on the Max scene, sandboxing, or what the `undo` and `timeout` parameters actually do, which are the risk-relevant traits for arbitrary code execution.

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 the action and environment, then the return-value rules. No filler; only minor cost is the slightly cryptic backtick formatting around `rt`.

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?

Return-value explanation is present (and an output schema exists, so that is close to redundant), and the execution environment is covered. For a tool that runs arbitrary code, the omission of undo semantics, timeout behavior, and scene-mutation implications leaves meaningful gaps.

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 coverage is 0%, so the description must compensate for all three parameters. It handles `code` well (single expression returns value; multi-line must assign to `result`; print output returned) but never mentions `undo` or `timeout`, leaving two parameters entirely undocumented.

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?

States a specific verb and resource: 'Execute Python ... inside Max', plus the runtime context (3.11 with pymxs). It implicitly separates itself from the sibling max_run_maxscript by naming the language, but never explicitly contrasts the two, so an agent must infer which to choose.

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?

No when-to-use guidance and no explicit alternative named, despite max_run_maxscript being an obvious sibling. Nothing tells the agent when Python is preferable to MaxScript, or what the undo/timeout defaults imply for safe use.

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