list_projects
Retrieve all projects in the current DaVinci Resolve database, enabling AI assistants to display available projects for selection and further processing.
Instructions
List all available projects in the current database
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function that executes the 'list_projects' tool logic. Calls GetProjectListInCurrentFolder() on the DaVinci Resolve project manager, filtering out empty strings.
def list_projects(self) -> list[str]: """List all projects in the current database.""" self._ensure_connected() if self._project_manager: projects = self._project_manager.GetProjectListInCurrentFolder() return [p for p in projects if p] # Filter out empty strings return [] - src/davinci_mcp/types.py:62-76 (schema)Schema/Protocol definition for DaVinciProjectManager, which defines GetProjectListInCurrentFolder() used by list_projects.
@runtime_checkable class DaVinciProjectManager(Protocol): """Protocol for DaVinci Resolve ProjectManager objects.""" def GetCurrentProject(self) -> DaVinciProject | None: """Get the currently open project.""" ... def GetProjectsInDatabase(self) -> list[dict[str, Any]]: """Get all projects in the current database.""" ... def GetProjectListInCurrentFolder(self) -> list[str]: """Get project list in current folder.""" ... - src/davinci_mcp/tools/__init__.py:48-53 (registration)Registration of the 'list_projects' tool in the MCP tools registry, defining its name, description, and empty input schema.
# Project tools types.Tool( name="list_projects", description="List all available projects in the current database", inputSchema={"type": "object", "properties": {}, "required": []}, ), - src/davinci_mcp/server.py:87-96 (registration)Dispatch handler in the server that routes 'list_projects' calls to resolve_client.list_projects(). Also referenced in the resource handler for 'resolve://projects' URI.
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", "")) elif name == "list_projects": return self.resolve_client.list_projects() - src/davinci_mcp/server.py:148-155 (registration)Resource handler that also uses list_projects() for the 'resolve://projects' resource URI.
async def _read_resource(self, uri: str) -> Any: """Dispatch a resource read to the resolve client.""" if uri == "resolve://version": return self.resolve_client.get_version() elif uri == "resolve://current-page": return self.resolve_client.get_current_page() elif uri == "resolve://projects": return self.resolve_client.list_projects()