xd_export_svg
Export selected Adobe XD layers as one self-contained SVG with embedded vectors, images, and effects, so a group or drawing imports into Figma as a single vector.
Instructions
Export one or more layers as ONE self-contained SVG (vectors, gradients, shadows, masks and images embedded), so an illustration, icon or any drawing can be imported into Figma as a single vector instead of dozens of pieces. Pass the layer ids of a group, or the parts of a merged drawing from xd_infer_layout. Only the selected layers are drawn (no page background). Use saveTo to write the SVG to a folder inside the allowed roots; otherwise it is returned inline (up to 600k characters).
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": {
"file": "<file>",
"artboard": "<artboard>",
"ids": "<ids>"
},
"name": "xd_export_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Layer ids from xd_export_artboard, or the parts list of a merged drawing | |
| file | Yes | Absolute path to a .xd file | |
| saveTo | No | Optional absolute folder (inside the allowed roots); the SVG is saved there and its path returned | |
| padding | No | Extra pixels around the drawing | |
| artboard | Yes | Artboard id or name |