Skip to main content
Glama

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
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • 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)
  • 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
  • FastMCP tool registration decorator for the get_project_files handler.
    @self.mcp.tool()

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