Skip to main content
Glama

add_layer

Add a new shape, text, media, repeater, or group layer to the Chorono scene; assign a unique id so you can target it with keyframes.

Instructions

Add a new layer to the scene. Set a meaningful id (e.g. "bg_rect", "title_text") — you will use this id in add_keyframes track targets.

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": {
      "id": "<id>",
      "name": "<name>",
      "type": "<type>"
    },
    "name": "add_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoX position in px (left edge of bounding box)
yNoY position in px (top edge of bounding box)
idYesUnique layer id used to reference in keyframes
loopNoVideo/audio loop
nameYesDisplay name shown in the layer panel
seedNoBlob deterministic seed integer
textNoText content (required when type=text)
typeYesLayer type
countNoRepeater: number of copies
endMsNoTime (ms) when layer disappears
mutedNoVideo/audio muted
phaseNoWave phase offset in radians
sidesNoEdge count for polygon/star (3-12) or blob (5-64)
stepXNoRepeater linear: x offset per copy (px)
stepYNoRepeater linear: y offset per copy (px)
turnsNoSpiral turn count (0.5–20)
widthNoWidth in px
heightNoHeight in px
scaleXNoHorizontal scale (1 = 100%)
scaleYNoVertical scale (1 = 100%)
volumeNoVideo/audio volume 0–1
assetIdNoMedia: id of an existing scene asset (see list_assets)
opacityNoOpacity 0-1
startMsNoTime (ms) when layer becomes visible
endAngleNoEnd angle for arc/ring in degrees
fontSizeNo
parentIdNoParent group layer id
amplitudeNoWave peak height in px
endRadiusNoSpiral outer ending radius in px
fillColorNoFill hex color e.g. "#3B82F6"
frequencyNoWave full-cycle count across width (0.1–50)
objectFitNoImage fit mode (default contain)
requestIdNo
sessionIdNo
shapeKindNoShape geometry kind
textAlignNo
textColorNo
tightnessNoSpiral radius interpolation exponent (1=linear)
fontFamilyNo
fontWeightNo
startAngleNoStart angle for arc/ring in degrees
stepScaleXNoRepeater: scaleX step per copy
stepScaleYNoRepeater: scaleY step per copy
fillOpacityNo
innerRadiusNoInner radius for star/ring
polarRadiusNoRepeater polar: ring radius (px)
rotationDegNoRotation in degrees
startRadiusNoSpiral inner starting radius in px
stepOpacityNoRepeater: opacity step per copy
strokeColorNo
strokeWidthNo
cornerRadiusNo
irregularityNoBlob noise ratio 0–1
repeaterModeNoRepeater layout
stepRotationNoRepeater: rotation step per copy (deg)
letterSpacingNo
polarEndAngleNoRepeater polar: end angle (deg)
sourceLayerIdNoRepeater: id of the layer to repeat
polarStartAngleNoRepeater polar: start angle (deg)
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, closed-world mutation, so the safety profile is covered. The description adds one genuinely useful behavioral fact — the id becomes the reference handle for add_keyframes track targets — but says nothing about the expectedRevision concurrency parameter, what happens on duplicate id collisions, or that required fields vary by type.

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

Conciseness5/5

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

Two short sentences, both load-bearing: the first states the action, the second gives the id convention and its downstream consequence. Nothing redundant and no filler.

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

Completeness2/5

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

For a 60-parameter creation tool with conditional required fields (text when type=text, assetId for media, sourceLayerId for repeaters) and an optimistic-concurrency parameter, the description covers only the id. The rich schema mitigates this, but key cross-parameter rules and mutation semantics are not addressed anywhere the agent will readily see them.

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

Parameters3/5

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

Schema description coverage is 78%, so the schema carries most parameter meaning and the baseline is 3. The description adds a naming-convention example for id but is silent on the other 59 parameters, including expectedRevision and assetId (a required prerequisite for media types), which are the highest-risk inputs.

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

Purpose4/5

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

States a specific verb and resource ("Add a new layer to the scene") and hints at its position in the workflow by naming add_keyframes as the downstream consumer. It does not explicitly separate itself from sibling creators like clone_layer, array_layer, or group_layers, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: create a layer, then keyframe it by id. There is no explicit guidance on when to use add_layer versus clone_layer, array_layer, group_layers, or update_layer, and no prerequisites (e.g. assets must exist first for image/video/audio, groups must exist before parentId).

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