Skip to main content
Glama

get_project_files

Retrieve all files within a specified Penpot project by providing the project ID, enabling programmatic access to design assets for automation and analysis.

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

  • The MCP tool handler for 'get_project_files'. Registers the tool and implements the logic by calling PenpotAPI.get_project_files(project_id), wrapping results and errors.
    @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)
  • PenpotAPI helper method that makes the authenticated HTTP POST request to Penpot's get-project-files RPC endpoint to retrieve the list of files in a project.
    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

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