run_script
Executes DazScript inside Daz Studio to handle tasks not covered by named tools, using optional args and returning a JSON result.
Instructions
Runs DazScript inside Daz Studio for anything the named tools do not cover.
Globals: Scene, App, MainWindow, DazMcp (helpers such as DazMcp.findNode, DazMcp.log).
Use DazMcp.log(msg) for messages and return the result.
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": "run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Object available to the code as `args`. | |
| code | Yes | DazScript (ES5 JavaScript) run as a function body; `return` a JSON value. |