Skip to main content
Glama

penpot_schema

Generate Penpot API schema in JSON format for integrating AI assistants with the Penpot design platform, enabling automated design workflows and file interactions.

Instructions

Provide the Penpot API schema as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function implementing the 'penpot_schema' tool logic. This tool loads and returns the Penpot API JSON schema from the resources directory.
    def penpot_schema() -> dict: """Provide the Penpot API schema as JSON.""" schema_path = os.path.join(config.RESOURCES_PATH, 'penpot-schema.json') try: with open(schema_path, 'r') as f: return json.load(f) except Exception as e: return {"error": f"Failed to load schema: {str(e)}"}
  • Registration logic in the server __init__ method that conditionally registers the resource tools including 'penpot_schema' when config.RESOURCES_AS_TOOLS is True.
    if config.RESOURCES_AS_TOOLS: self._register_resources(resources_only=True) self._register_tools(include_resource_tools=True) else: self._register_resources(resources_only=False) self._register_tools(include_resource_tools=False)
  • The same handler function registered as an MCP resource at 'penpot://schema', providing the Penpot schema for reference.
    @self.mcp.resource("penpot://schema", mime_type="application/schema+json") def penpot_schema() -> dict: """Provide the Penpot API schema as JSON.""" schema_path = os.path.join(config.RESOURCES_PATH, 'penpot-schema.json') try: with open(schema_path, 'r') as f: return json.load(f) except Exception as e: return {"error": f"Failed to load schema: {str(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