Skip to main content
Glama

Kalpana Designer

Create layers

create_layers

Add layers to a design in one call: frames, groups, text, rectangles, ellipses, lines, images (a workspace image key or an https URL) and vectors (SVG path data), nested with children. Frames with a flow arrange their children in a row or column, so build text stacks and button rows as flows instead of placing each line by hand. parent_id adds inside a frame, index sets the paint position, and replace swaps the layer with the same id in place. Returns the new layer ids and the layout_issues this call caused (overflow, overlap, text off the page). Saved as a new revision that undo reverts; if any part is refused, nothing changes. Use it for new layers; change existing ones with update_layers, bring in SVG artwork with import_svg, and copy whole pages with duplicate.

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": "create_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexNoPosition among the parent's children (front-most last); end when omitted.
intentYesOne short sentence: what you change and why. Kept in the design history.
layersNo
page_idYesThe page to work on, as returned by create_design.
previewNoAlso return a preview picture of the result. Use it only when you need to see the design (the finished build, visual fixes); leave it off for empty frames and structural steps.
replaceNoA layer in `layers` whose `id` exists replaces that layer and its children in place, keeping the id.
parent_idNoFrame or group to add into; the scene when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / $defs / FillSpec / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "gradient": {
      -        "$ref": "#/$defs/GradientSpec"
      -      }
      -    },
      -    "required": [
      -      "gradient"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$ref": "#/$defs/GradientSpec",
      -    "description": "A gradient written flat: `{type: \"radial\", stops: [...]}`."
      -  },
      -  {
      -    "description": "A live shader: {shader, preset, params, speed}. See list_shaders.",
      -    "properties": {
      -      "frame": {
      -        "type": "number"
      -      },
      -      "image": {
      -        "description": "Image filters: the image asset they work on.",
      -        "type": "string"
      -      },
      -      "opacity": {
      -        "type": "number"
      -      },
      -      "params": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "preset": {
      -        "type": "string"
      -      },
      -      "shader": {
      -        "type": "string"
      -      },
      -      "speed": {
      -        "description": "Shader seconds per timeline second (0 = still).",
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "shader"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "filters": {
      -        "$ref": "#/$defs/FiltersSpec",
      -        "description": "Photo adjustments; kept when only the image changes."
      -      },
      -      "fit": {
      -        "$ref": "#/$defs/FitSpec"
      -      },
      -      "focus": {
      -        "items": {
      -          "type": "number"
      -        },
      -        "maxItems": 2,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "image": {
      -        "description": "The image's key, or an https URL.",
      -        "type": "string"
      -      },
      -      "opacity": {
      -        "type": "number"
      -      },
      -      "tile_scale": {
      -        "type": "number"
      -      },
      -      "zoom": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "image"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "color": {
      -        "type": "string"
      -      },
      -      "opacity": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "color"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "gradient": {
      +        "$ref": "#/$defs/GradientSpec"
      +      }
      +    },
      +    "required": [
      +      "gradient"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$ref": "#/$defs/GradientSpec",
      +    "description": "A gradient written flat: `{type: \"radial\", stops: [...]}`."
      +  },
      +  {
      +    "description": "A live shader: {shader, preset, params, speed}. See list_shaders.",
      +    "properties": {
      +      "frame": {
      +        "type": "number"
      +      },
      +      "image": {
      +        "description": "Image filters: the image asset they work on.",
      +        "type": "string"
      +      },
      +      "opacity": {
      +        "type": "number"
      +      },
      +      "params": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "preset": {
      +        "type": "string"
      +      },
      +      "shader": {
      +        "type": "string"
      +      },
      +      "speed": {
      +        "description": "Shader seconds per timeline second (0 = still).",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "shader"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "anchor": {
      +        "$ref": "#/$defs/ImageAnchor",
      +        "description": "Fit images: edge or corner they sit against when their shape differs from the box (rows line up)."
      +      },
      +      "filters": {
      +        "$ref": "#/$defs/FiltersSpec",
      +        "description": "Photo adjustments; kept when only the image changes."
      +      },
      +      "fit": {
      +        "$ref": "#/$defs/FitSpec"
      +      },
      +      "focus": {
      +        "items": {
      +          "type": "number"
      +        },
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "image": {
      +        "description": "The image's key, or an https URL.",
      +        "type": "string"
      +      },
      +      "opacity": {
      +        "type": "number"
      +      },
      +      "tile_scale": {
      +        "type": "number"
      +      },
      +      "zoom": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "image"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "color": {
      +        "type": "string"
      +      },
      +      "opacity": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "color"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / $defs / GradientSpec / properties / interpolation
      Added value: +{
      +  "$ref": "#/$defs/InterpolationSpec",
      +  "description": "Blend space: oklab (default), oklch (turns through hue), srgb."
      +}
    • addedInput schema / $defs / ImageAnchor
      Added value: +{
      +  "enum": [
      +    "center",
      +    "top",
      +    "bottom",
      +    "left",
      +    "right",
      +    "top-left",
      +    "top-right",
      +    "bottom-left",
      +    "bottom-right"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / InterpolationSpec
      Added value: +{
      +  "enum": [
      +    "srgb",
      +    "oklab",
      +    "oklch"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / LayerSpec / properties / anchor
      Added value: +{
      +  "$ref": "#/$defs/ImageAnchor",
      +  "description": "Fit images: edge or corner they sit against when their shape differs from the box (rows line up)."
      +}
    • addedInput schema / $defs / LayerSpec / properties / place
      Added value: +{
      +  "$ref": "#/$defs/PlaceSpec",
      +  "description": "Image layers: \"subject\" makes x, y, width, height the box of the cut-out's visible subject; the layer grows to fit the file around it."
      +}
    • addedInput schema / $defs / PlaceSpec
      Added value: +{
      +  "enum": [
      +    "box",
      +    "subject"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / $defs / LayerSpec / properties / max_lines / description
      Added value: +"Most lines shown; longer text ends in an ellipsis. auto_height grows up to it. 0 clears."
  3. Changed2 schema fields changed
    • addedInput schema / $defs / ContourSpec
      Added value: +{
      +  "description": "Lengths are fractions of the font size.",
      +  "oneOf": [
      +    {
      +      "description": "Dots; `colors` take turns.",
      +      "properties": {
      +        "colors": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "size": {
      +          "type": "number"
      +        },
      +        "spacing": {
      +          "type": "number"
      +        },
      +        "style": {
      +          "const": "dots",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "style",
      +        "size",
      +        "spacing",
      +        "colors"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "color": {
      +          "type": "string"
      +        },
      +        "style": {
      +          "const": "line",
      +          "type": "string"
      +        },
      +        "width": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "style",
      +        "width",
      +        "color"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "properties": {
      +    "inset": {
      +      "description": "From the letter edge: above 0 inside (0.01 suits heavy type), below 0 outside.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "inset"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / $defs / LayerSpec / properties / contours
      Added value: +{
      +  "description": "Text: dots or a line along the letters' own shape, for any text a row brings. `[]` removes them.",
      +  "items": {
      +    "$ref": "#/$defs/ContourSpec"
      +  },
      +  "type": "array"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / $defs / TextPathAlign
      Added value: +{
      +  "enum": [
      +    "start",
      +    "center",
      +    "end"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / TextPathSpec / properties / align
      Added value: +{
      +  "$ref": "#/$defs/TextPathAlign",
      +  "description": "Which part of the line sits at that point: start, center (the middle of the path unless `start` says otherwise) or end."
      +}
    • removedInput schema / $defs / TextPathSpec / properties / start / default
      Removed value: -0
    • changedInput schema / $defs / TextPathSpec / properties / start / description
      Previous value: -"Where the text sits along the path, 0-1 (the text_path_offset track animates it)."New value: +"Where the text sits along the path, 0-1 (the text_path_offset track animates it). Default 0, or the point `align` names."
  5. Changed4 schema fields changed
    • addedInput schema / $defs / LayerSpec / properties / baseline_shift
      Added value: +{
      +  "description": "Px up (+) or down (-), line kept: - hangs a big first letter.",
      +  "type": "number"
      +}
    • changedInput schema / $defs / LayerSpec / properties / text_warp / description
      Previous value: -"Text: bend the lettering: arch (+ up, - sags), bulge, flag (a wave), perspective (+ narrower top); none straightens."New value: +"Text: bend the lettering: arch (+ up, - sags), bulge (+ taller middle, - taller ends), flag (a wave), perspective (+ narrower top), bounce (each letter tilted and lifted: hand lettering)."
    • addedInput schema / $defs / TextRun / properties / baseline_shift
      Added value: +{
      +  "description": "Px up (+) or down (-), line kept: - hangs a big first letter.",
      +  "type": "number"
      +}
    • changedInput schema / $defs / TextWarpKindSpec / enum
      Previous value: -[
      -  "none",
      -  "arch",
      -  "bulge",
      -  "flag",
      -  "perspective"
      -]New value: +[
      +  "none",
      +  "arch",
      +  "bulge",
      +  "flag",
      +  "perspective",
      +  "bounce"
      +]
  6. Changed15 schema fields changed
    • changedInput schema / $defs / BlendSpec / description
      Previous value: -"pass_through: Groups and frames: children blend with what is behind the group.; print_light: Mockups: a lighting map that lights the print below it in its group."New value: +"pass_through: Groups and frames: children blend with what is behind the group.; print_light: Mockups: a lighting map that lights the print below it in its group.; knockout: cuts its shape out of the layers below it in its group, drawing nothing.; fill_below: paints only where the layers below it in its group are."
    • changedInput schema / $defs / BlendSpec / enum
      Previous value: -[
      -  "normal",
      -  "darken",
      -  "multiply",
      -  "color_burn",
      -  "linear_burn",
      -  "lighten",
      -  "screen",
      -  "color_dodge",
      -  "linear_dodge",
      -  "overlay",
      -  "soft_light",
      -  "hard_light",
      -  "difference",
      -  "exclusion",
      -  "hue",
      -  "saturation",
      -  "color",
      -  "luminosity",
      -  "pass_through",
      -  "print_light"
      -]New value: +[
      +  "normal",
      +  "darken",
      +  "multiply",
      +  "color_burn",
      +  "linear_burn",
      +  "lighten",
      +  "screen",
      +  "color_dodge",
      +  "linear_dodge",
      +  "overlay",
      +  "soft_light",
      +  "hard_light",
      +  "difference",
      +  "exclusion",
      +  "hue",
      +  "saturation",
      +  "color",
      +  "luminosity",
      +  "pass_through",
      +  "print_light",
      +  "knockout",
      +  "fill_below"
      +]
    • addedInput schema / $defs / LayerSpec / properties / leading_trim
      Added value: +{
      +  "$ref": "#/$defs/LeadingTrimSpec",
      +  "description": "cap_height: the box hugs the letters, cap height to baseline (centre type by its letters). none: the line box."
      +}
    • addedInput schema / $defs / LayerSpec / properties / outlines
      Added value: +{
      +  "description": "Text: rings outside the stroke, innermost first, each `width` px (white then dark: a double outline). `[]` removes them.",
      +  "items": {
      +    "$ref": "#/$defs/OutlineSpec"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / $defs / LayerSpec / properties / shadows / description
      Previous value: -"Replaces the layer's shadows. `[]` removes them."New value: +"Replaces the layer's shadows; `[]` removes them. The first lies farthest back, the last nearest the layer (unlike CSS)."
    • addedInput schema / $defs / LayerSpec / properties / skew
      Added value: +{
      +  "description": "Lean in degrees (-80 to 80), + tips the top right like italic; 0 removes. Slants a font with no italic face; posters lean 8 to 15.",
      +  "type": "number"
      +}
    • addedInput schema / $defs / LayerSpec / properties / text_warp
      Added value: +{
      +  "$ref": "#/$defs/TextWarpSpec",
      +  "description": "Text: bend the lettering: arch (+ up, - sags), bulge, flag (a wave), perspective (+ narrower top); none straightens."
      +}
    • changedInput schema / $defs / LayerSpec / properties / texture / description
      Previous value: -"Rough, frayed edges (torn paper)."New value: +"Rough, frayed edges (torn paper); frays text, so not for clean type."
    • addedInput schema / $defs / LeadingTrimSpec
      Added value: +{
      +  "enum": [
      +    "none",
      +    "cap_height"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / OutlineSpec
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "color": {
      +      "description": "Hex colour.",
      +      "type": "string"
      +    },
      +    "width": {
      +      "description": "Thickness of the ring in px.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "color",
      +    "width"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / $defs / TextEffectPreset / description
      Previous value: -"background: pill behind the text (create only)."New value: +"extrude: solid 3D depth (`color` its side, `angle` its way; add a stroke to outline face and depth). background: pill behind the text (create only)."
    • changedInput schema / $defs / TextEffectPreset / enum
      Previous value: -[
      -  "none",
      -  "shadow",
      -  "lift",
      -  "hollow",
      -  "splice",
      -  "echo",
      -  "glitch",
      -  "neon",
      -  "outline",
      -  "sticker",
      -  "gradient",
      -  "background"
      -]New value: +[
      +  "none",
      +  "shadow",
      +  "lift",
      +  "hollow",
      +  "splice",
      +  "echo",
      +  "extrude",
      +  "glitch",
      +  "neon",
      +  "outline",
      +  "sticker",
      +  "gradient",
      +  "background"
      +]
    • addedInput schema / $defs / TextEffectSpec / properties / angle
      Added value: +{
      +  "description": "Extrude: degrees clockwise from right the depth runs (default 45).",
      +  "type": "number"
      +}
    • addedInput schema / $defs / TextWarpKindSpec
      Added value: +{
      +  "enum": [
      +    "none",
      +    "arch",
      +    "bulge",
      +    "flag",
      +    "perspective"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / TextWarpSpec
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "amount": {
      +      "description": "-1 to 1 (default 0.5).",
      +      "type": "number"
      +    },
      +    "kind": {
      +      "$ref": "#/$defs/TextWarpKindSpec"
      +    }
      +  },
      +  "required": [
      +    "kind"
      +  ],
      +  "type": "object"
      +}
  7. Changed4 schema fields changed
    • changedInput schema / $defs / GradientSpec / properties / repeat / description
      Previous value: -"Past the last stop: hold its colour (none, default), repeat the gradient (stripes, rings) or mirror it."New value: +"Past the last stop: hold its colour (none, default), repeat the gradient (stripes, rings) or mirror it. Repeat tiles the from-to segment: fine stripes need a short from/to."
    • changedInput schema / $defs / LayerSpec / properties / x / description
      Previous value: -"Left edge in px, relative to the parent. Ignored inside a layout flow unless `absolute` is true."New value: +"Left edge in px, relative to the parent. Ignored inside a layout flow unless `absolute` is true. Rotated: the box before rotation."
    • addedInput schema / $defs / ShadowSpec / properties / spread / description
      Added value: +"On an image it grows the picture's alpha (blur 0: a sticker outline)."
    • addedInput schema / $defs / StrokeSpec / description
      Added value: +"Follows the layer's box; around a cutout's own edge, use a shadow with blur 0 and spread."
  8. First observed

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnly=false, destructive=false, openWorld=true; the description adds far more: it returns new layer ids plus `layout_issues` (overflow, overlap, text off page), writes a new revision revertible by undo, and is atomic ("if any part is refused, nothing changes"). That atomicity and revision behavior are exactly the kind of mutation semantics annotations cannot carry. Not a 5 only because it doesn't mention auth/permission needs or size limits for large batches.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then parameters, then return/undo semantics, then sibling routing — a logical progression with no filler sentences. It is dense (the layer-type enumeration and the flow advice are packed in one sentence each) but every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a large mutation tool with 7 params and no output schema, the description closes the important gaps: it describes the return value (new layer ids and layout_issues), the persistence model (new revision, undo reverts), and the failure mode (all-or-nothing). An agent can invoke this correctly without further context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 86%, so the schema already does most of the work; the description still adds relational meaning the schema states only tersely: `parent_id` adds inside a frame, `index` sets paint position, `replace` swaps the layer with the same id in place, and `flow` on a frame arranges children in a row or column. It also clarifies that images accept a workspace image key or an https URL. It goes beyond baseline 3 by explaining how the parameters interact rather than restating them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Add layers to a design in one call" names the verb and resource, then enumerates every creatable layer type (frames, groups, text, rectangles, ellipses, lines, images, vectors) and the nesting mechanism via `children`. This is clearly distinguishable from `update_layers`, `import_svg`, and `duplicate`, which are named at the end.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use is given for this tool ("Use it for new layers") and three alternatives are named with their selecting conditions: `update_layers` for existing layers, `import_svg` for SVG artwork, `duplicate` for whole pages. It also gives a positive design guideline: build text stacks and button rows as `flow` frames instead of hand-placing lines.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources