create_svg
Imports SVG markup or a local .svg file into Figma as editable vector layers inside a frame, with optional scaling and flattening for icons.
Instructions
Import SVG as editable vector layers (wrapped in a frame). Give either svg (raw markup) or path (local .svg file read by the server). Set width and/or height to scale it (only one -> proportional; both -> scale then stretch). flatten: true merges all shapes into a single vector inside the frame — handy for icons. Returns the frame (with children when flattened).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Position relative to parent. If x, y and parentId are all omitted the node is centred in the viewport | |
| y | No | ||
| svg | No | Raw SVG markup, e.g. '<svg viewBox="0 0 24 24">...</svg>' | |
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| name | No | ||
| path | No | Local .svg file path (absolute, ~ or relative to the server cwd) | |
| width | No | ||
| height | No | ||
| flatten | No | Flatten all layers into one vector | |
| parentId | No | Parent frame/group/section id; default current page |