Skip to main content
Glama

Update groups

update_groups

Transform, keyframe, rename, nest or lock GROUPS. A group moves, scales, rotates and fades as ONE unit, without touching any child's stored position — which is how you get a camera push instead of building the target layout twice and crossfading it.

Address by group_id, never by name. Ids come from get_clip, or from the group_id that add_elements/update_elements hands back when you pass group. An unknown id is an error, never a silent create.

There is no add_groups: a group is CREATED by putting elements in one — add_elements(group: "hero-card") — which also returns its id. That is not a shortcut; a group's pivot comes from its children's bounding box, so an empty group has no geometry to transform.

The shortest path, in one script:

const clip = get_clip({ project_id, clip_index: 2, select: ["groups"] }); const byName = new Map(clip.groups.map(g => [g.name, g.id])); update_groups({ project_id, items: [{ clip_index: 2, group_id: byName.get("hero-card"), anchor_px: [960, 540], keyframes: [ { timestamp: 0, scaleX: 1, scaleY: 1 }, { timestamp: 1.2, scaleX: 2.4, scaleY: 2.4, offsetX: -400, offsetY: -120, interpolation: "easeOut" }, ], }]});

Units are canvas pixels, as everywhere else: offset_px, blur_px and anchor_px are pixels; scale is a multiplier; rotation/rotate are degrees; opacity is 0-100.

anchor_px is the pivot everything rotates and scales about. Give it as a point on the canvas — the server converts it to a fraction of the group's child bounding box and reports back both that fraction and the box, so you can check it. Default is the box's centre. Set it when you want a push that favours one corner. Because it is stored as a fraction of the members' box, adding or removing members moves the pivot on the canvas; set anchor_px again after changing a transformed group's membership.

Only fields you pass are changed. keyframes: [] CLEARS every track; omitting keyframes leaves them alone; a non-empty list replaces the WHOLE track of each property it names and leaves the other properties alone, so to change one keyframe send every keyframe of that property (read them from get_clip's groups). parent_group_id: "" moves a group to the clip root; omitting it leaves the parent alone.

Keyframable: offsetX, offsetY, scaleX, scaleY, rotation, rotateX, rotateY, opacity, blur. Position, size and colour belong to elements, not groups.

Concurrency: clip-scoped (a group edit can add or re-parent nodes in its clip). Serialize against other mutations on the SAME clip; different clips and different projects run in parallel freely.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesOne entry per group to update
returningNoWhat comes back, the way get_clip's `select` shapes a read. Omitted: ids, the measured layout and the clip audit in compact form. 'ids': element_id per result. 'layout': the measured text fit (font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — widen a box to natural_width_px, not text_width_px; an `adjusted` entry when the measured line box replaced your height) plus `placement` {y_anchor, top, center, bottom}: compare placement.center with a container's centre line to verify centring. 'qa.codes': the clip audit with severity/code/element_ids per finding; 'qa': with the message and fix on each. Errors always come back: in full under ['ids'], as {clip_index, errors: [{code, element_ids}]} under []; bleed under a keyframed group is a warning marked camera_move. A failed item and font_warnings always come back. [] is the leanest write: {total, succeeded, failed} plus errors.
project_idYesThe project ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / items / items / properties / insert_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "front",
      +        "back"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "before": {
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "before"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "after": {
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "after"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Z-order: moves the whole group as a block; members keep their order. 'front'/'back' of its scope, or {before|after: element or group id} (taking that node's parent)."
      +}
    • removedInput schema / properties / items / items / properties / keyframes / items / properties / opacity / maximum
      Removed value: -100
    • removedInput schema / properties / items / items / properties / keyframes / items / properties / opacity / minimum
      Removed value: -0
    • changedInput schema / properties / items / items / properties / keyframes / items / properties / timestamp / description
      Previous value: -"Clip-relative time in seconds"New value: +"Clip-relative time in seconds, 0 or later (0 = the clip's first frame)"
    • changedInput schema / properties / returning / description
      Previous value: -"Declare what comes back, the way get_clip's `select` shapes a read. Omit it and you get ids, the measured layout, and the clip audit in compact form — which names every problem but drops the explanatory prose. Values: 'ids' (element_id per result), 'layout' (the measured text fit — font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — `fits` is the WIDTH check (the widest rendered line inside the box), `fits_height` is the separate height one — plus an `adjusted` entry whenever the measured line box replaced the height you sent; widen a box to natural_width_px, NOT text_width_px, which is the widest RENDERED line and so a lower bound on text that is already wrapping; plus `placement` {y_anchor, top, center, bottom} — where the box landed and what your `y` meant, emitted only when the origin was implicit or resolves to 'center'. Compare placement.center with a container's centre line to verify centring: a mis-anchored label is the one layout error nothing else reports), 'qa.codes' (audit counts and summary plus severity/code/element_ids per finding), 'qa' (the same audit with the full message and suggested fix on every finding — ask for this when a code alone isn't enough to act on). A text element measured on a fallback face is listed in top-level `font_warnings` whichever you choose. ERROR-severity findings always come back with their full message whichever you choose — including `returning:[]` and `['ids']`, which suppress WARNINGS only. A failed item always returns complete. Pass [] for just {total, succeeded, failed} plus any errors, the leanest write."New value: +"What comes back, the way get_clip's `select` shapes a read. Omitted: ids, the measured layout and the clip audit in compact form. 'ids': element_id per result. 'layout': the measured text fit (font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — widen a box to natural_width_px, not text_width_px; an `adjusted` entry when the measured line box replaced your height) plus `placement` {y_anchor, top, center, bottom}: compare placement.center with a container's centre line to verify centring. 'qa.codes': the clip audit with severity/code/element_ids per finding; 'qa': with the message and fix on each. Errors always come back: in full under ['ids'], as {clip_index, errors: [{code, element_ids}]} under []; bleed under a keyframed group is a warning marked camera_move. A failed item and font_warnings always come back. [] is the leanest write: {total, succeeded, failed} plus errors."
  2. Changed3 schema fields changed
    • removedInput schema / properties / items / items / properties / keyframes / items / properties / bezier_overrides / required
      Removed value: -[
      -  "offsetX",
      -  "offsetY",
      -  "scaleX",
      -  "scaleY",
      -  "rotation",
      -  "rotateX",
      -  "rotateY",
      -  "opacity",
      -  "blur"
      -]
    • removedInput schema / properties / items / items / properties / keyframes / items / properties / interpolation_overrides / required
      Removed value: -[
      -  "offsetX",
      -  "offsetY",
      -  "scaleX",
      -  "scaleY",
      -  "rotation",
      -  "rotateX",
      -  "rotateY",
      -  "opacity",
      -  "blur"
      -]
    • changedInput schema / properties / returning / description
      Previous value: -"Declare what comes back, the way get_clip's `select` shapes a read. Omit it and you get ids, the measured layout, and the clip audit in compact form — which names every problem but drops the explanatory prose. Values: 'ids' (element_id per result), 'layout' (the measured text fit — font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — `fits` is the WIDTH check (the widest rendered line inside the box), `fits_height` is the separate height one — plus an `adjusted` entry whenever the measured line box replaced the height you sent; widen a box to natural_width_px, NOT text_width_px, which is the widest RENDERED line and so a lower bound on text that is already wrapping; plus `placement` {y_anchor, top, center, bottom} — where the box landed and what your `y` meant, emitted only when the origin was implicit or resolves to 'center'. Compare placement.center with a container's centre line to verify centring: a mis-anchored label is the one layout error nothing else reports), 'qa.codes' (audit counts and summary plus severity/code/element_ids per finding), 'qa' (the same audit with the full message and suggested fix on every finding — ask for this when a code alone isn't enough to act on). ERROR-severity findings always come back with their full message whichever you choose — including `returning:[]` and `['ids']`, which suppress WARNINGS only. A failed item always returns complete. Pass [] for just {total, succeeded, failed} plus any errors, the leanest write."New value: +"Declare what comes back, the way get_clip's `select` shapes a read. Omit it and you get ids, the measured layout, and the clip audit in compact form — which names every problem but drops the explanatory prose. Values: 'ids' (element_id per result), 'layout' (the measured text fit — font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — `fits` is the WIDTH check (the widest rendered line inside the box), `fits_height` is the separate height one — plus an `adjusted` entry whenever the measured line box replaced the height you sent; widen a box to natural_width_px, NOT text_width_px, which is the widest RENDERED line and so a lower bound on text that is already wrapping; plus `placement` {y_anchor, top, center, bottom} — where the box landed and what your `y` meant, emitted only when the origin was implicit or resolves to 'center'. Compare placement.center with a container's centre line to verify centring: a mis-anchored label is the one layout error nothing else reports), 'qa.codes' (audit counts and summary plus severity/code/element_ids per finding), 'qa' (the same audit with the full message and suggested fix on every finding — ask for this when a code alone isn't enough to act on). A text element measured on a fallback face is listed in top-level `font_warnings` whichever you choose. ERROR-severity findings always come back with their full message whichever you choose — including `returning:[]` and `['ids']`, which suppress WARNINGS only. A failed item always returns complete. Pass [] for just {total, succeeded, failed} plus any errors, the leanest write."
  3. Changed4 schema fields changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      -  "type": "string"
      -}
    • removedInput schema / properties / conversation_id
      Removed value: -{
      -  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      -  "type": "string"
      -}
    • removedInput schema / properties / llm_model
      Removed value: -{
      -  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "project_id",
      -  "items",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "project_id",
      +  "items"
      +]
  4. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "project_id",
      -  "items"
      -]New value: +[
      +  "project_id",
      +  "items",
      +  "context",
      +  "llm_model"
      +]
  5. Changed19 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / items / items / properties / anchor_px / items
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]New value: +false
    • addedInput schema / properties / items / items / properties / anchor_px / prefixItems
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • addedInput schema / properties / items / items / properties / clip_index / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / items / items / properties / keyframes / items / properties / bezier_overrides / propertyNames / type
      Added value: +"string"
    • addedInput schema / properties / items / items / properties / keyframes / items / properties / bezier_overrides / required
      Added value: +[
      +  "offsetX",
      +  "offsetY",
      +  "scaleX",
      +  "scaleY",
      +  "rotation",
      +  "rotateX",
      +  "rotateY",
      +  "opacity",
      +  "blur"
      +]
    • removedInput schema / properties / items / items / properties / keyframes / items / properties / interpolation_overrides / additionalProperties / $ref
      Removed value: -"#/properties/items/items/properties/keyframes/items/properties/interpolation"
    • addedInput schema / properties / items / items / properties / keyframes / items / properties / interpolation_overrides / additionalProperties / enum
      Added value: +[
      +  "linear",
      +  "easeInOut",
      +  "easeIn",
      +  "easeOut",
      +  "sigmoid",
      +  "smootherstep",
      +  "smoothstep",
      +  "hold",
      +  "easeInBack",
      +  "easeOutBack",
      +  "easeInOutBack",
      +  "custom"
      +]
    • addedInput schema / properties / items / items / properties / keyframes / items / properties / interpolation_overrides / additionalProperties / type
      Added value: +"string"
    • addedInput schema / properties / items / items / properties / keyframes / items / properties / interpolation_overrides / propertyNames / type
      Added value: +"string"
    • addedInput schema / properties / items / items / properties / keyframes / items / properties / interpolation_overrides / required
      Added value: +[
      +  "offsetX",
      +  "offsetY",
      +  "scaleX",
      +  "scaleY",
      +  "rotation",
      +  "rotateX",
      +  "rotateY",
      +  "opacity",
      +  "blur"
      +]
    • changedInput schema / properties / items / items / properties / offset_px / items
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]New value: +false
    • addedInput schema / properties / items / items / properties / offset_px / prefixItems
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • changedInput schema / properties / items / items / properties / rotate / items
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]New value: +false
    • addedInput schema / properties / items / items / properties / rotate / prefixItems
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • changedInput schema / properties / items / items / properties / scale / items
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]New value: +false
    • addedInput schema / properties / items / items / properties / scale / prefixItems
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • changedInput schema / properties / returning / description
      Previous value: -"Declare what comes back, the way get_clip's `select` shapes a read. Omit it and you get ids, the measured layout, and the clip audit in compact form — which names every problem but drops the explanatory prose. Values: 'ids' (element_id per result), 'layout' (the measured text fit — font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — `fits` is the WIDTH check (the widest rendered line inside the box), `fits_height` is the separate height one — plus an `adjusted` entry whenever the measured line box replaced the height you sent; widen a box to natural_width_px, NOT text_width_px, which is the widest RENDERED line and so a lower bound on text that is already wrapping), 'qa.codes' (audit counts and summary plus severity/code/element_ids per finding), 'qa' (the same audit with the full message and suggested fix on every finding — ask for this when a code alone isn't enough to act on). ERROR-severity findings always come back with their full message whichever you choose — including `returning:[]` and `['ids']`, which suppress WARNINGS only. A failed item always returns complete. Pass [] for just {total, succeeded, failed} plus any errors, the leanest write."New value: +"Declare what comes back, the way get_clip's `select` shapes a read. Omit it and you get ids, the measured layout, and the clip audit in compact form — which names every problem but drops the explanatory prose. Values: 'ids' (element_id per result), 'layout' (the measured text fit — font_size_px, text_width_px, natural_width_px, line_count, fits_width/fits_height/fits — `fits` is the WIDTH check (the widest rendered line inside the box), `fits_height` is the separate height one — plus an `adjusted` entry whenever the measured line box replaced the height you sent; widen a box to natural_width_px, NOT text_width_px, which is the widest RENDERED line and so a lower bound on text that is already wrapping; plus `placement` {y_anchor, top, center, bottom} — where the box landed and what your `y` meant, emitted only when the origin was implicit or resolves to 'center'. Compare placement.center with a container's centre line to verify centring: a mis-anchored label is the one layout error nothing else reports), 'qa.codes' (audit counts and summary plus severity/code/element_ids per finding), 'qa' (the same audit with the full message and suggested fix on every finding — ask for this when a code alone isn't enough to act on). ERROR-severity findings always come back with their full message whichever you choose — including `returning:[]` and `['ids']`, which suppress WARNINGS only. A failed item always returns complete. Pass [] for just {total, succeeded, failed} plus any errors, the leanest write."
  6. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false/destructiveHint=false/openWorldHint=false, so the description carries real weight and delivers: partial-update semantics ('Only fields you pass are changed'), the destructive keyframe rules ([] clears, non-empty replaces the whole track per property), parent_group_id:"" re-parenting, and clip-scoped concurrency guidance. It stops short of stating auth/permission requirements, which keeps it just under a 5.

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-loads purpose and addressing rules, then units, then mutation semantics, then concurrency — a logical order. It is long, and the embedded code example consumes real space, but nearly every sentence carries decision-relevant content for a tool with this many interaction rules, so the length is largely justified.

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 complex nested-write tool with no output schema, the description covers creation, addressing, units, partial-update semantics, pivot behavior, keyframe replacement rules, re-parenting, and concurrency isolation. An agent has everything needed to invoke it correctly, with the `returning` parameter documented in-schema.

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 description coverage is already 100%, so the baseline is 3; the description exceeds it by consolidating units (pixels vs multiplier vs degrees vs 0-100 opacity) and adding genuinely non-obvious behavior for anchor_px (stored as a fraction of the child bounding box, so it drifts when membership changes) and for keyframe clearing/replacement. It does not need to re-document fields the schema already covers.

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?

Opens with a specific verb set and resource: 'Transform, keyframe, rename, nest or lock GROUPS.' It actively distinguishes itself from siblings by stating 'Position, size and colour belong to elements, not groups' and by explaining the absence of add_groups, so an agent can route between update_groups and update_elements without ambiguity.

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?

Gives explicit when-to-use ('address by group_id'), when-not and the alternative path ('There is no add_groups: a group is CREATED by putting elements in one — add_elements(group: ...)'), plus a full worked script showing the end-to-end call. Error semantics ('An unknown id is an error, never a silent create') close the loop.

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.