Skip to main content
Glama

penpot_tree_schema

Extract the Penpot object tree schema in JSON format to enable AI-driven analysis, search, and automated workflows within the Penpot MCP Server.

Instructions

Provide the Penpot object tree schema as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'penpot_tree_schema' tool by loading and returning the Penpot tree schema JSON file.
    @self.mcp.tool() def penpot_tree_schema() -> dict: """Provide the Penpot object tree schema as JSON.""" schema_path = os.path.join(config.RESOURCES_PATH, 'penpot-tree-schema.json') try: with open(schema_path, 'r') as f: return json.load(f) except Exception as e: return {"error": f"Failed to load tree schema: {str(e)}"}
  • Registration of the 'penpot_tree_schema' as an MCP resource (penpot://tree-schema), which shares the same implementation as the tool version.
    @self.mcp.resource("penpot://tree-schema", mime_type="application/schema+json") def penpot_tree_schema() -> dict: """Provide the Penpot object tree schema as JSON.""" schema_path = os.path.join(config.RESOURCES_PATH, 'penpot-tree-schema.json') try: with open(schema_path, 'r') as f: return json.load(f) except Exception as e: return {"error": f"Failed to load tree schema: {str(e)}"}
  • Conditional logic in server initialization that controls whether resources like penpot_tree_schema are registered as tools.
    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)

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