exportImageAsset
Export a generated image asset using its session and asset ID to get base64 data plus format, dimensions, and size metadata; optionally save it to disk when running locally.
Instructions
Export a generated image asset by session and asset ID.
Returns the image inline as base64 along with metadata (format, dimensions, size).
When running locally (stdio transport), you can optionally provide a destinationPath to save the image to disk. Files are only ever written inside one export folder (~/Downloads/opengraph-mcp, or MCP_EXPORT_DIR); pass a file name or a path inside it. SVG is returned as a file only, never inline, because it can carry script.
USAGE: After generating an image with generateImage, use the sessionId and assetId to export: exportImageAsset(sessionId="...", assetId="...")
To save to disk (local/stdio only): exportImageAsset(sessionId="...", assetId="...", destinationPath="logo.png")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assetId | Yes | The asset UUID to export | |
| sessionId | Yes | The session UUID containing the asset | |
| destinationPath | No | Optional file name or path inside the export folder (~/Downloads/opengraph-mcp, or MCP_EXPORT_DIR). Only works when the server is running locally (stdio transport). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| size | No | ||
| error | No | ||
| format | No | ||
| success | Yes |