create_image
Place a raster image as a new rectangle fill or replace an existing node's fill from a local path, URL, or data URI, with optional size and placement.
Instructions
Place a raster image (PNG/JPEG/GIF; max 20 MB, max 4096x4096 px) as a rectangle with an IMAGE fill. source is an absolute local path, an http(s) URL or a data URI — the server loads the bytes. Default size is the image's natural size; give width or height alone to scale proportionally, or both to set the box (scaleMode decides how the image fits). With targetNodeId the image instead replaces the fills of an existing node (frame, rectangle, ellipse, ...) and no node is created. Returns the node plus image {hash, width, height}. Use create_svg for SVG files.
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": {
"source": "<source>"
},
"name": "create_image"
}
}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 | ||
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| name | No | ||
| width | No | ||
| height | No | ||
| source | Yes | Absolute file path, http(s) URL, or data:image/...;base64,... URI | |
| parentId | No | Parent frame/group/section id; default current page | |
| scaleMode | No | Default FILL | |
| cornerRadius | No | ||
| targetNodeId | No | Set the image as the fill of this existing node instead of creating a rectangle |