switch_page
Navigate directly to any workspace in DaVinci Resolve, including Media, Cut, Edit, Fusion, Color, Fairlight, and Deliver pages, for efficient project workflow management.
Instructions
Switch to a specific page in DaVinci Resolve
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | The page to switch to |
Implementation Reference
- Core handler: The switch_page method on DaVinciResolveClient. It validates the page name against allowed pages (media, cut, edit, fusion, color, fairlight, deliver), then calls self._resolve.OpenPage(page.lower()) to switch the page in DaVinci Resolve.
def switch_page(self, page: str) -> bool: """Switch to a specific page.""" self._ensure_connected() valid_pages = [ "media", "cut", "edit", "fusion", "color", "fairlight", "deliver", ] if page.lower() not in valid_pages: raise ValueError(f"Invalid page. Must be one of: {', '.join(valid_pages)}") if self._resolve: return bool(self._resolve.OpenPage(page.lower())) return False - src/davinci_mcp/server.py:87-94 (registration)Tool dispatch in _call_tool: Routes the 'switch_page' MCP tool name to self.resolve_client.switch_page(), passing the 'page' argument from the request.
async def _call_tool(self, name: str, arguments: dict[str, Any]) -> Any: """Dispatch a tool call to the resolve client.""" if name == "get_version": return self.resolve_client.get_version() elif name == "get_current_page": return self.resolve_client.get_current_page() elif name == "switch_page": return self.resolve_client.switch_page(arguments.get("page", "")) - Schema registration: Defines the switch_page tool with name, description, and inputSchema requiring a 'page' string parameter with an enum of allowed page values (media, cut, edit, fusion, color, fairlight, deliver).
types.Tool( name="switch_page", description="Switch to a specific page in DaVinci Resolve", inputSchema={ "type": "object", "properties": { "page": { "type": "string", "description": "The page to switch to", "enum": [ "media", "cut", "edit", "fusion", "color", "fairlight", "deliver", ], } }, "required": ["page"], }, ), - Helper _ensure_connected: Called by switch_page to verify connection to DaVinci Resolve before executing the page switch.
def _ensure_connected(self) -> None: """Ensure we're connected to Resolve.""" if not self._is_connected: raise DaVinciResolveConnectionError("Not connected to DaVinci Resolve")