Skip to main content
Glama

Execute Code

execute_code
Destructive

Run Python code inside an Autodesk Maya session to inspect scenes, build assets, and verify 3D content against engineering rules.

Instructions

Execute Python code in a Maya session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython code to execute.
result_typeNoHow to handle the result: - "NONE": Execute statements, don't capture result - "JSON": Evaluate expression, JSON encode result - "RAW": Evaluate expression, return string representationNONE
session_keyNoSession key (optional if only one session exists)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and non-idempotent, so the safety profile is conveyed structurally. The description adds nothing beyond that – it does not warn that arbitrary code runs with full privileges in a live session, that effects are irreversible, or how result handling works.

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 short sentence with no filler, and the core action is front-loaded. It is efficient, though arguably terse to the point of under-specification for a destructive tool.

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

Completeness2/5

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

For a destructive, non-idempotent tool with no output schema, the description should explain that return values depend on result_type and that the code mutates live scene state. None of this is covered, leaving significant gaps for safe invocation.

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 100%, so all three parameters including the result_type enum-like modes are fully documented in the schema. The one-line description adds no parameter meaning beyond that, which is the baseline 3 case.

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 (Execute) and resource (Python code) plus the execution context (a Maya session). It is clear what the tool does, but it does not distinguish itself from siblings like write_module, which also implies code authoring/execution.

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, no exclusions, and no mention of alternatives such as the higher-level scene_* inspection tools. The agent must infer that this is the escape hatch for arbitrary operations.

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