We are building a Lunacy plugin that exports designs to Unity UI.
We need to know whether plugins can officially read and update document-level resources, especially:
colorStyles in document.json
fills that reference image patterns
embedded image resources used by pattern.image
document components / component libraries
adding or updating shared styles and images while the document is open
Currently we can read layer data and layer custom metadata, but we have not found an official HTTP/MCP endpoint for document-level styles or image resources.
Is there an official API for this?
If not, is direct .free document modification supported or discouraged while Lunacy is running?
Are there plans to expose document styles, image assets, and components through the plugin API?
Our goal is to maintain a version-controlled local asset/component library and sync it into the current Lunacy document safely.
We checked the MCP exposed tools, but they appear to focus on layer-level operations. Is there any MCP or HTTP API for document-level resources such as colorStyles, embedded images, and components?
At the moment, there’s no official plugin, MCP, or HTTP API for full document-level resource management.
The current Automation API is mostly layer-focused. It supports layer operations, exports, screenshots, undo/redo, and a few limited document helpers:
/getcomponents can return component master layers, but only by known component IDs.
/getimage can return an image resource, but only by known image ID / OutputFileName.
/insertimage inserts an image as a new layer.
Layer create/update can include fills, including pattern fills.
There’s currently no endpoint to list, read, or update document-level resources like all styles, embedded images, shared style collections, component library metadata, or shared library contents.
Directly modifying the .free package or document.json while the document is open is not supported. Lunacy keeps the document state in memory, so external edits may be overwritten or leave the file in an inconsistent state.
For now, the safe path is to use the Automation API for layer-level sync, image insertion, and component/layer access where IDs are known. Direct .free editing should only be treated as an offline file-format operation, not a live plugin API.
We can’t confirm roadmap plans at this point; supporting this would require new official endpoints.