Skip to main content
Glama

list_projects

Retrieve a list of all available Penpot projects to facilitate programmatic access and interaction with design files via the Penpot MCP Server.

Instructions

Retrieve a list of all available Penpot projects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function for 'list_projects'. It calls the PenpotAPI's list_projects method and handles errors, returning the projects wrapped in a dict.
    @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) @self.mcp.tool()
  • Supporting helper method in PenpotAPI class that performs the actual HTTP request to list projects from Penpot API.
    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
  • The @self.mcp.tool() decorator registers this function as the MCP tool named 'list_projects'.
    @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) @self.mcp.tool()

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/montevive/penpot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server