create_timeline
Allows AI assistants to create a new timeline in DaVinci Resolve by specifying its name.
Instructions
Create a new timeline with the given name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name for the new timeline |
Implementation Reference
- Schema definition for the 'create_timeline' tool, including its input schema requiring a 'name' parameter of type string.
types.Tool( name="create_timeline", description="Create a new timeline with the given name", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "The name for the new timeline", } }, "required": ["name"], }, ), - src/davinci_mcp/server.py:119-126 (registration)Registration/handler dispatch in the MCP server that routes 'create_timeline' tool calls to the resolve client.
elif name == "create_timeline": name_arg = arguments.get("name", "") result = self.resolve_client.create_timeline(name_arg) return ( f"Successfully created timeline '{name_arg}'" if result else f"Failed to create timeline '{name_arg}'" ) - Handler implementation that creates a new timeline via DaVinci Resolve's MediaPool.CreateEmptyTimeline API.
def create_timeline(self, name: str) -> bool: """Create a new timeline.""" project = self._ensure_project() media_pool = project.GetMediaPool() if not media_pool: raise DaVinciResolveError("Failed to get Media Pool") timeline = media_pool.CreateEmptyTimeline(name) if timeline: logger.info(f"Created timeline: {name}") return True return False