MCP server for interacting with Autodesk Maya sessions
The server has 4 tools with clear action-verb naming (list_, write_, execute_, add_) and detailed docstrings. However, parameter descriptions lack specificity around constraints and error handling guidance is absent. The execute_code tool accepts a free-form 'result_type' string parameter without an enum constraint, inviting hallucinated values. Schema documentation is present but incomplete, output types are documented in docstrings but not in machine-readable form. Tool descriptions are good (100-250 chars) but do not explain when to use each tool vs. alternatives or what happens on error. The server lacks structured error classification and recovery guidance, critical for agent reliability.
Manually add a Maya session at a specific host and port. Use this when auto-discovery doesn't find your Maya session, or to connect to a Maya instance on a specific port. Args: host: The session host (default: "127.0.0.1") port: The session port number (default: 7001) Returns: Session information for the added session Before using this, ensure Maya has a Python command port open. In Maya's Script Editor (Python), run: import maya.cmds as cmds cmds.commandPort(name=':7001', sourceType='python')
Execute Python code in a Maya session. Args: code: Python code to execute. result_type: How to handle the result: - "NONE": Execute statements, don't capture result - "JSON": Evaluate expression, JSON encode result - "RAW": Evaluate expression, return string representation session_key: Session key (optional if only one session exists) Returns: Captured result (None if result_type is NONE) Note: stdout and stderr are delivered in real-time via MCP Resource subscriptions (maya://sessions/{session_key}/stdout and /stderr). Call get_output() to retrieve buffered output. Example: # Execute statements execute_code("import maya.cmds as cmds; cmds.polyCube()") # Get JSON result execute_code("cmds.ls(type='mesh')", result_type="JSON")
List all active Maya sessions. Returns a list of session information including: - session_key: Session key used to interact with tools and resources - host: Session host address - port: Session port number - pid: Maya process ID - user: Logged-in user - maya_version: Maya version string - scene_name: Current scene filename - scene_path: Full path to current scene Note: To detect new or removed sessions, clients should call this tool periodically (e.g., every 10-30 seconds) and compare results. The SessionManager automatically scans for new Maya sessions in the background.
execute_code accepts result_type as free-form string ('NONE', 'JSON', 'RAW') without enum constraint. LLMs may hallucinate invalid values like 'PYTHON' or 'STRING'.
No error handling guidance in any tool description. Tools do not specify what happens on failure (e.g., 'Invalid session_key: try list_sessions()' or 'Execute timeout: request took >30s'). Agents cannot recover from failures.
session_key parameter is marked optional ('session_key: str | None') with description 'optional if only one session exists', but no guidance on what error occurs if zero or multiple sessions exist. Agents cannot handle the ambiguity.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 63 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 57 | - | v1 |
Create a virtual Python module in a Maya session. Args: name: Module name. Can be a dotted path (e.g., 'mypackage.utils') in which case parent packages are created automatically. code: Python source code for the module. overwrite: If True, replace existing module. If False, raise error if module already exists. session_key: Session key (optional if only one session exists) Returns: Success message Example: write_module("mytools", ''' import maya.cmds as cmds def create_cube(name="cube1"): return cmds.polyCube(name=name)[0] ''') # Then use it: execute_code("import mytools; mytools.create_cube('myCube')")
Output schemas not documented in machine-readable form. list_sessions returns list[SessionInfo] but SessionInfo structure is not visible in the source snippet. Agents cannot infer the response field names (e.g., is it 'session_key' or 'sessionKey'?).
write_module description includes example code in the docstring. LLMs may reuse the exact example function signature rather than adapting to user intent. Use enums or format constraints instead of example values in descriptions.
execute_code tool description references real-time output delivery via Resource subscriptions (maya://sessions/{session_key}/stdout and /stderr) but does not explain that agents must subscribe to these resources to see output. The tool returns the execution result but agents may miss stderr errors if they don't know to check the resources.