Skip to main content
Glama

maya_execute

Execute arbitrary Python code in Autodesk Maya for any task without a dedicated tool, such as rigging, UV, deformers, custom nodes, and Bifrost. Combine multiple operations into one call to reduce cost and overhead.

Instructions

Maya 안에서 임의의 Python 코드를 실행합니다. Maya 로 되는 모든 작업의 통로입니다.

전용 툴이 없는 작업(리깅, UV, 디포머, 커스텀 노드, Bifrost 등)은 전부 이 툴로 하세요. 여러 작업을 한 번에 묶어 보내는 편이 툴을 여러 번 호출하는 것보다 훨씬 빠르고 저렴합니다.

사용 가능한 이름: cmds (maya.cmds), mel (maya.mel), om (maya.api.OpenMaya).

반환 규약:

  • 코드가 단일 표현식이면 그 값이 value 가 됩니다. 예) cmds.ls(selection=True)

  • 여러 줄이면 result 변수에 담긴 값이 value 가 됩니다.

  • stdout 에 print 출력이, 실패하면 error 에 트레이스백이 담깁니다. 실패 시 에러를 읽고 고쳐서 다시 시도하세요.

Args: code: 실행할 Python 코드. undo_chunk: True 면 실행 전체를 하나의 undo 단위로 묶습니다. 사용자가 Ctrl+Z 한 번으로 되돌릴 수 있으므로 기본값을 유지하세요.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
undo_chunkNo
Behavior4/5

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

Without annotations, the description carries the full burden and discloses key runtime behaviors: which API namespaces are available (cmds, mel, om), return value conventions, stdout/error capture, and undo chunk semantics. It does not explicitly warn about the potential destructive side effects of arbitrary code execution, but the '임의의 Python 코드' statement makes the power and risk inherently clear.

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?

The description is well-structured with a lead sentence, usage guidance, a clear list of available names, and a concise return-contract section. Every sentence adds unique value—no filler or repetition of schema fields—and the content is front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a powerful code-execution tool with no annotations and no output schema, the description is remarkably complete. It explains how to invoke, what parameters mean, how return values and errors are delivered, and when to prefer this tool over dedicated ones. This gives an agent everything needed to use and recover from failures.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 entirely. It thoroughly explains both parameters: 'code' is the Python code to execute, and 'undo_chunk' is described with its default behavior and user-facing undo impact (Ctrl+Z). It also adds valuable return-format semantics tied to the code input.

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?

The description clearly states the tool executes arbitrary Python code inside Maya ('Maya 안에서 임의의 Python 코드를 실행합니다') and positions it as the general-purpose gateway for operations lacking dedicated tools. This distinguishes it from specialized sibling tools like maya_scene_info or maya_unreal_export_fbx by explicitly naming unsupported task categories (rigging, UV, deformers, etc.).

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?

The description explicitly says to use this tool for tasks without dedicated tools ('전용 툴이 없는 작업...은 전부 이 툴로 하세요'), implying use dedicated tools when available. It also provides batching guidance, stating that combining multiple tasks in one call is faster and cheaper than separate calls, and instructs the agent to read errors and retry on failure.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YomenStyle/maya-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server