Execute Approved Script
script.executeRun a Python script in Maya by providing its file path. Optionally supply arguments that become available as args in the script.
Instructions
Execute a Python script file in Maya from an allowed MAYA_MCP_SCRIPT_DIRS directory. The script is read server-side and sent to Maya. Optional args dict is injected as args in the script namespace.
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": {
"file_path": "<file_path>"
},
"name": "script.execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional arguments dict injected as __args__ in the script namespace | |
| timeout | No | Optional timeout override in seconds (default from MAYA_MCP_SCRIPT_TIMEOUT) | |
| file_path | Yes | Absolute path to the .py script file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | Yes | ||
| output | Yes | ||
| script | Yes | ||
| success | Yes |