penpot_schema
Retrieve the Penpot API schema in JSON format to understand available endpoints and data structures for programmatic design workflows.
Instructions
Provide the Penpot API schema as JSON.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- penpot_mcp/server/mcp_server.py:372-379 (handler)The handler function for the 'penpot_schema' tool, which loads the Penpot schema JSON file from the resources path and returns it as a dictionary.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)}"}
- penpot_mcp/server/mcp_server.py:371-371 (registration)Registration of the 'penpot_schema' tool using the MCP decorator.@self.mcp.tool()
- penpot_mcp/server/mcp_server.py:138-145 (handler)Identical handler function registered as a resource 'penpot://schema', providing the same schema loading logic.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)}"}
- penpot_mcp/server/mcp_server.py:137-137 (registration)Registration of the penpot_schema as an MCP resource.@self.mcp.resource("penpot://schema", mime_type="application/schema+json")