get_project_files
Retrieve all design files from a specific Penpot project by providing the project ID to access and manage design assets.
Instructions
Get all files contained within a specific Penpot project.
Args:
project_id: The ID of the Penpot project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Implementation Reference
- penpot_mcp/server/mcp_server.py:176-187 (handler)MCP tool handler for 'get_project_files'. Calls PenpotAPI.get_project_files(project_id) and returns {'files': files} or error dict.@self.mcp.tool() def get_project_files(project_id: str) -> dict: """Get all files contained within a specific Penpot project. Args: project_id: The ID of the Penpot project """ try: files = self.api.get_project_files(project_id) return {"files": files} except Exception as e: return self._handle_api_error(e)
- penpot_mcp/api/penpot_api.py:518-538 (helper)Helper method in PenpotAPI class that makes authenticated POST to Penpot's /rpc/command/get-project-files endpoint with project-id payload and returns list of files.def get_project_files(self, project_id: str) -> List[Dict[str, Any]]: """ Get all files for a specific project. Args: project_id: The ID of the project Returns: List of file information dictionaries """ url = f"{self.base_url}/rpc/command/get-project-files" payload = { "project-id": project_id } response = self._make_authenticated_request('post', url, json=payload, use_transit=False) # Parse JSON files = response.json() return files
- penpot_mcp/server/mcp_server.py:176-176 (registration)FastMCP tool registration decorator for the get_project_files handler.@self.mcp.tool()