Import an SVG
import_svgAdd an SVG (icon, logo, illustration) as editable vector layers inside one new group, from its markup in svg: paths, rectangles, circles, lines and polygons with their fills, strokes, linear and radial gradients and transforms. Each becomes an unclipped frame; groups and shapes are named from id, data-name, inkscape:label or aria-label, so update_layers select and animate can find them. Text, images, masks, clips, filters and are skipped and listed in skipped: add text with create_layers and photos as image layers. Returns the group and every layer made. Saved as a new revision that undo reverts; if any part is refused, nothing changes. Use it for artwork drawn elsewhere; for exact geometric shapes use shape_path.
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": {
"page_id": "<page_id>",
"intent": "<intent>"
},
"name": "import_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge in px relative to the parent (centred when omitted). | |
| y | No | Top edge in px relative to the parent (centred when omitted). | |
| svg | No | The SVG markup. | |
| name | No | Name of the group the shapes go into ("SVG" by default). | |
| width | No | Width in px to scale to, keeping the aspect ratio. Default: the SVG's own width, shrunk to fit inside the parent when larger. | |
| intent | Yes | One short sentence: what you change and why. Kept in the design history. | |
| page_id | Yes | The page to work on, as returned by create_design. | |
| parent_id | No | Frame or group to add into; the scene when omitted. |