Graphite: export the active document
graphite_exportExport all artwork in the active Graphite document to SVG or raster formats such as PNG, JPG and WebP, saving the result to disk and returning its absolute path.
Instructions
Render the active Graphite document (all artwork) to a file and write it to disk. Returns the absolute path. Use svg for editable/scalable output and png for a bitmap; png with scale 0.25–0.5 is a cheap way to check what Graphite actually rendered. Fails with EXPORT_FAILED if the document has no layers, BRIDGE_TIMEOUT if rendering did not finish within GRAPHITE_MCP_EXPORT_TIMEOUT_MS (the first raster render of a large document can be slow: simply retry, or raise the limit), and EXPORT_PATH_NOT_ALLOWED if path escapes the approved export directories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Where to write the file. A bare file name goes into the connector's export directory; an absolute path must lie inside one of the approved export roots. The extension is fixed to match format. Omit to use the document name. | |
| scale | No | Raster scale factor (2 = 2× resolution; 0.25–0.5 gives a quick preview). Ignored for svg. | |
| format | No | Output format. svg keeps vectors; the raster formats are rendered at the document's pixel size times scale. | svg |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the written file. | |
| bytes | Yes | ||
| format | Yes | ||
| success | Yes |