Skip to main content
Glama

get_file

Retrieve a specific Penpot design file using its unique ID and cache it for programmatic access. Facilitates automated workflows by enabling AI models to interact with design files directly.

Instructions

Retrieve a Penpot file by its ID and cache it. Don't use this tool for code generation, use 'get_object_tree' instead.

Args: file_id: The ID of the Penpot file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes

Implementation Reference

  • The main handler function for the 'get_file' MCP tool. It fetches the file data from the Penpot API using self.api.get_file and caches it in self.file_cache before returning the data.
    @self.mcp.tool() def get_file(file_id: str) -> dict: """Retrieve a Penpot file by its ID and cache it. Don't use this tool for code generation, use 'get_object_tree' instead. Args: file_id: The ID of the Penpot file """ try: file_data = self.api.get_file(file_id=file_id) self.file_cache.set(file_id, file_data) return file_data except Exception as e: return self._handle_api_error(e)

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