export_node_as_image
Export any Figma node as PNG, JPG, SVG or PDF: return the image directly in the response or save it to an absolute path, with optional scale, background color and overwrite.
Instructions
Export a node as an image. Without savePath the image comes back in the answer (PNG, JPG) or as text (SVG). With savePath (absolute path, extension matching the format, existing folder) the file is written to disk and only its path and size come back; an existing file is refused unless overwrite is true. background (PNG only) lays the export on a solid color so a white component can be seen: '#000000', '#rrggbbaa' or 'transparent' (default, nothing added); the node itself is never changed. PDF needs savePath.
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": {
"nodeId": "<nodeId>"
},
"name": "export_node_as_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Export scale (default 1, max 4; ignored for SVG and PDF) | |
| format | No | Export format (default PNG) | |
| nodeId | Yes | The ID of the node to export | |
| savePath | No | Absolute path of the file to write | |
| overwrite | No | Allow replacing an existing file at savePath | |
| background | No | PNG only: 'transparent' or a hex color laid behind the image |