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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "max_run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| undo | No | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |