Kalpana Docs
Designer MCP

Layers

Create a page and build, read, change and delete its layers.

create_design

Start a new page: a canvas of the given size with a background. It is saved in the workspace at once.

ParameterTypeRequiredDefaultDescription
widthnumberYes—1 to 8192 px.
heightnumberYes—1 to 8192 px.
intentstringYes—What and why.
namestringNo"Untitled"The design's name.
backgroundfillNoWhiteThe canvas fill; "none" for transparent.
template_idstringNoA new templateAdd the page as the next page of this template.

Common sizes: 1080 × 1080 or 1080 × 1350 feed post, 1080 × 1920 story, 1920 × 1080 or 1200 × 628 landscape.

  • Returns: The new page's page_id and its template_id.

create_layers

Add layers to a page, nested with their children, in one call.

ParameterTypeRequiredDefaultDescription
page_idstringYes—The page.
intentstringYes—What and why.
previewbooleanNofalseAlso return a picture of the result.
layerslayer[]No—The layers to add, each with type and optional children.
parent_idstringNoThe pageFrame or group to add into.
indexintegerNoEndPosition among the parent's children (front-most last).
replacebooleanNofalseA layer in layers whose id exists replaces that layer and its children in place, keeping the id.
  • Returns: The new layer ids.

Every text and image layer becomes an input of the template, labelled by its name. font_family must be one of the families list_fonts returns; any other is refused.


update_layers

Change existing layers. Only the fields given change; send every fix in one call.

ParameterTypeRequiredDefaultDescription
page_idstringYes—The page.
intentstringYes—What and why.
page_idsstring[]No—Instead of page_id: 1 to 5 pages to make the same updates on, such as the slides of a carousel made with duplicate. Every layer an update names by id must be on every page with the same type, or no page changes. The reply lists each page under pages. Each page counts as one paid call.
updatesobject[]No—One per layer: its id, or select instead of id to pick many layers ({name, within, type}: name takes * and ?, case-sensitive; within is a frame or group id; type is a layer type), and any layer fields except type and children. Also coords (parent or page) for how x and y are read.
previewbooleanNofalseAlso return a picture of the result.
updates[].if_matchstringNo—The layer's etag from get_design. If the layer changed since, that update is refused with its current state. Not listed in the tool's schema.

To move, wrap or align layers, use edit_structure; to delete them, delete_layers.


edit_structure

Change the layer tree with a list of operations, applied in order. It does not delete layers; that is delete_layers.

ParameterTypeRequiredDefaultDescription
page_idstringYes—The page.
intentstringYes—What and why.
opsobject[]Yes—The operations below, each with its op.
skip_missingbooleanNofalseSkip ids that are not on the page in move, unwrap and set_id instead of failing the call; the result lists them in skipped.
opFieldsDoes
moveids (required), parent_id, indexMove layers under another parent (the page when parent_id is omitted), at index. Their x/y stay relative to the new parent.
duplicateid (required), count (1), offset_x (0), offset_y (0)Copy a layer with its children and motion next to the original; each copy shifts by the offsets from the previous one.
wrapids (required), name, id, flowWrap siblings in a new group, or in a frame with a layout flow when flow is given. id gives the new layer its id.
frameids (required), name, idWrap siblings in a frame fitted around them, without a flow. id gives the frame its id.
booleanids (required), operation (required: union, subtract, intersect, exclude), nameCombine shapes into one boolean layer that takes the bottom shape's fills; the shapes stay inside it, editable. With one boolean layer in ids, only its operation changes.
unwrapid (required)Remove a group, frame or boolean, keeping its children in its place.
maskids (required), nameWrap siblings in a "Mask group" whose bottom layer masks the ones above it.
unmaskids (required)Stop layers from masking.
scaleids (required), factor (required), about (origin or center)Scale layers and everything inside them: size, text, spacing, radii, strokes, effects and paths.
alignids (required), to (required: left, center, right, top, middle, bottom), relative_to (selection or parent)Line layers up with the box around them, or one layer with its parent. Layers a flow places cannot move.
distributeids (required, 3 or more), axis (required: x or y)Even gaps between layers; the first and last stay.
reorderid (required), to (required: front, back, forward, backward)Change paint order among siblings.
set_idid (required), new_id (required)Give a layer a new unused id. After duplicate, give each page's own content its own id.

delete_layers

Delete layers and everything inside them, with their motion. undo brings them back.

ParameterTypeRequiredDefaultDescription
page_idstringYes—The page.
intentstringYes—What and why.
idsstring[]Yes—The layers to delete.
skip_missingbooleanNofalseSkip ids that are not on the page instead of refusing the call; the result lists them in skipped.
  • Returns: The deleted layer ids. To hide a layer for now, set visible: false with update_layers.

get_design

An outline of a page's layers after layout. Read it before changing a design.

ParameterTypeRequiredDefaultDescription
page_idstringYes—The page.
node_idstringNoThe whole pageDescribe only this layer and what is inside it.
depthintegerNoAllLevels of children to include.
compactbooleanNofalseA shorter reply, to look rather than edit.
timenumberNo0The moment of an animation to describe.
with_previewbooleanNofalseAlso return a small picture of the page at time.
timelinebooleanNofalseAlso return the timeline: length, still time, choreography and what moves on each layer and when. With node_id, that layer's keyframes as [time, value].
timeline_detailbooleanNofalseLike timeline, with keyframes as {t, value, easing, hold}, to tune with edit_keyframes.
  • Returns: Each layer's id, type, name, box [x, y, w, h] in page px, text, colours, layout flow and etag, plus the fonts used.

import_svg

Add an SVG (icon, logo, illustration, a drawing made elsewhere) as editable vector layers inside one group. Paths, rectangles, circles, lines and polygons keep their fills, strokes, linear and radial gradients and transforms. Each <g> becomes a group named from its id, data-name or inkscape:label, and each shape keeps its name, so update_layers and animate can find them.

ParameterTypeRequiredDefaultDescription
page_idstringYes—The page.
intentstringYes—What and why.
svgstringYes—The SVG markup.
namestringNo"SVG"Name of the group the shapes go into.
parent_idstringNoThe pageFrame or group to add into.
widthnumberNoThe SVG's own widthWidth in px to scale to, keeping the aspect ratio. A larger SVG is shrunk to fit inside the parent.
xnumberNoCentredLeft edge in px, relative to the parent.
ynumberNoCentredTop edge in px, relative to the parent.
  • Returns: The group's id as group_id, the number of shapes, the placed size, every layer made, and skipped: text, images, masks, clips, filters and <use> are not imported and are listed there.

make_chart

A chart drawn from numbers as editable layers. Every point, bar, tick and label is computed.

ParameterTypeRequiredDefaultDescription
page_id, intentstringYes—The page, and what and why.
x, y, width, heightnumberYes—Where the chart sits in its parent, and its size.
series{values, name?, color?}[]Yes—The data. Colours come from palette when left out.
kindstringNo"line"line, bar, area, step, horizontal_bar, stacked_bar, scatter, donut, pie, sparkline, progress_ring, gauge or radar.
stylestringNo"clean"clean, minimal, bold, editorial, glow (for dark backgrounds), blocks or outline.
labelsstring[]No—A label per value along the x axis (per bar, segment or spoke).
palettestring[]NoBuilt-inSeries colours in order, as hex.
font_family, font_sizestring, numberNoSize: height ÷ 22, at least 24Every chart label's font.
text_color, grid_colorstringNo—Hex.
axes, x_labels, y_labelsbooleanNoPer styleAxis labels, both or each side.
grid, ticksboolean, integerNoticks: 4Grid lines; ticks: 0 removes them and the y labels.
legendbooleanNoWith 2+ seriesA key of series names.
value_labelsbooleanNo—Label the last point, each bar's top or the ring's value.
dots, smoothbooleanNoPer styleA dot on each point; curved lines.
line_width, bar_width, corner, thicknessnumberNoPer styleLine width, bar share of its slot (0.1 to 1), bar corner radius, ring thickness.
maxnumberNo100Full scale for progress_ring, gauge and radar.
y_min, y_maxnumberNoFrom the dataFix the value range.
x_values, sizesnumber[]No—Scatter: each point's x, and sizes for a bubble chart.
step_atstringNo"start"Step charts: start, middle or end.
decimalsinteger | "auto"No0 or 1Decimal places in value labels.
prefix, suffixstringNo—Around every value label.
annotationsobject[]No—{kind: "callout", index, text, series?}, {kind: "target", value, text?} (a dashed line) or {kind: "range", from, to, text?} (a shaded band).
name, parent_idstringNo"Chart", the pageThe chart layer's name and parent.
Was this page helpful?

Updated 5 Nov 2026

On this page