Save panel image
save_pngSaves a base64 PNG to a specified file for panel export when clipboard access is blocked, returning the written path.
Instructions
Internal helper for the panel UI — never call this directly.
The panel's export button calls it when the image clipboard is blocked by the sandbox; saving a picture is the user's click, not yours. The generate_* tools already write their PNG and SVG files themselves.
Expects a base64 PNG (with or without a data:image/png;base64,
prefix) and returns the path it was written to.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"png_base64": "<png_base64>",
"filename": "<filename>"
},
"name": "save_png"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| png_base64 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |