execute_resolve_code
Run custom Python scripts in DaVinci Resolve's scripting environment to control timelines, media pools, and more. Use print() or assign a result variable for output.
Instructions
Execute arbitrary Python code in the DaVinci Resolve scripting environment. Use this for operations not covered by specific tools.
Pre-loaded namespace variables:
resolve: The DaVinci Resolve object
project: The current project
mediaPool: The current media pool
timeline: The current timeline (may be None)
mediaStorage: The media storage object
Use print() to output results, or set a variable named 'result'.
Parameters:
code: Python code to execute
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": "execute_resolve_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |