list_projects
Retrieve all available Penpot projects to access design files for analysis and automated workflows.
Instructions
Retrieve a list of all available Penpot projects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- penpot_mcp/server/mcp_server.py:168-175 (handler)MCP tool handler for list_projects. Registers the tool and implements the logic by delegating to PenpotAPI.list_projects(), with error handling.@self.mcp.tool() def list_projects() -> dict: """Retrieve a list of all available Penpot projects.""" try: projects = self.api.list_projects() return {"projects": projects} except Exception as e: return self._handle_api_error(e)
- penpot_mcp/api/penpot_api.py:471-496 (helper)Core implementation of listing Penpot projects via authenticated API call to the Penpot RPC endpoint, with debug logging and response normalization.def list_projects(self) -> Dict[str, Any]: """ List all available projects for the authenticated user. Returns: Dictionary containing project information """ url = f"{self.base_url}/rpc/command/get-all-projects" payload = {} # No parameters required response = self._make_authenticated_request('post', url, json=payload, use_transit=False) if self.debug: content_type = response.headers.get('Content-Type', '') print(f"\nResponse content type: {content_type}") print(f"Response preview: {response.text[:100]}...") # Parse JSON data = response.json() if self.debug: print("\nData preview:") print(json.dumps(data, indent=2)[:200] + "...") return data