Skip to main content
Glama

execute_maxscript

Execute MAXScript code in Autodesk 3ds Max to automate tasks, manipulate objects, adjust settings, and retrieve data directly within the 3D modeling environment.

Instructions

在 3ds Max 中执行一段 MAXScript 代码并返回结果。

该工具允许你发送 MAXScript 代码到 3ds Max 中执行。 适用于某些用 MAXScript 更直接或更方便的操作场景。

使用说明:

  • 脚本中最后一个表达式的值将作为返回结果。

  • 如果需要返回复杂结构,建议将结果构造为字符串或在脚本中使用 print。

  • MAXScript 文档参考: https://help.autodesk.com/view/3DSMAX/2025/ENU/?guid=GUID-MAXScript-Index

Args: script: 要执行的 MAXScript 代码字符串。

Returns: dict: 操作结果。 - success (bool): 是否成功执行。 - result (str): MAXScript 执行结果的字符串表示。 - message (str): 操作描述信息。

示例脚本 - 获取选中对象数量: execute_maxscript(script="selection.count")

示例脚本 - 选中所有 Box 对象: execute_maxscript(script="select (for obj in objects where classOf obj == Box collect obj)")

示例脚本 - 重置场景: execute_maxscript(script="resetMaxFile #noPrompt")

示例脚本 - 设置渲染分辨率: execute_maxscript(script="renderWidth = 1920; renderHeight = 1080")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well. It discloses key behavioral traits: that the last expression's value is returned, recommendations for returning complex structures (construct as string or use print), and provides a documentation reference. It doesn't mention error handling, execution time limits, or security implications, but covers the essential execution behavior adequately.

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?

The description is well-structured with clear sections: purpose statement, usage guidance, execution behavior notes, parameter explanation, return format, and multiple examples. While comprehensive, it's appropriately sized for a powerful execution tool. Some sentences could be more concise, but overall it's efficiently organized with each section adding value.

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

Completeness4/5

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

For a tool with no annotations, no output schema, and 0% schema coverage, the description provides excellent context. It explains the execution model, return behavior, parameter usage, and includes practical examples. The main gap is lack of explicit error handling information, but given the complexity of executing arbitrary code, it provides substantial guidance for safe and effective use.

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?

With 0% schema description coverage for the single parameter, the description fully compensates. It clearly explains the 'script' parameter as '要执行的 MAXScript 代码字符串' (MAXScript code string to execute) and provides four concrete examples showing different use cases. The examples demonstrate parameter usage far beyond what the bare schema provides, adding substantial semantic context.

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's purpose: '在 3ds Max 中执行一段 MAXScript 代码并返回结果' (execute MAXScript code in 3ds Max and return results). It specifies the verb ('执行' - execute), resource ('MAXScript 代码' - MAXScript code), and distinguishes it from sibling tools like execute_python_script by explicitly mentioning MAXScript. The purpose is specific and unambiguous.

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 provides explicit usage guidance: '适用于某些用 MAXScript 更直接或更方便的操作场景' (suitable for scenarios where MAXScript is more direct or convenient). It distinguishes from alternatives by implying MAXScript should be used when it's more appropriate than other methods, though it doesn't name specific sibling tools as alternatives. The guidance is clear about when this tool is preferred.

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/317431629/3dsMaxMCP'

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