Zum Hauptinhalt springen

Brand Kit tools

The Brand Kit is the organization's library of reusable design snippets: buttons, text blocks, shapes, graphics and badges. These tools let an assistant discover saved elements, drop them onto the live canvas, and save new ones.

get-brand-kit-elements is a plain data tool. The two studio_* tools act on a design document and take a templateId or designId target (see Studio tools for how targeting works).


get-brand-kit-elements

List the organization's reusable Brand Kit elements. Returns enough detail (size, layer types, text previews) to pick the right snippet. Use the returned id with studio_insert_brand_kit_element to place one on the canvas. Optionally filter by category or a case-insensitive name query.

Parameters

ParameterTypeRequiredDescription
categorystringNoOne of button, text, shape, graphic, badge, other
querystringNoCase-insensitive substring match on the element name

Response

FieldTypeDescription
elementsarrayMatching Brand Kit elements
elements[].idstringElement id (use with studio_insert_brand_kit_element)
elements[].namestringElement name
elements[].categorystringCategory
elements[].layerCountnumberNumber of layers in the element
elements[].widthnumberGroup bounding-box width in px
elements[].heightnumberGroup bounding-box height in px
elements[].layerTypesstring[]Distinct layer types (text, shape, image, …)
elements[].textPreviewstring[]Up to 3 text-layer contents (for picking a headline/CTA)
elements[].inheritedbooleantrue when the snippet is propagated from an ancestor workspace
elements[].thumbnailUrlstring | nullThumbnail URL
countnumberNumber of elements returned

Example

{
"tool": "get-brand-kit-elements",
"arguments": { "category": "button" }
}

studio_insert_brand_kit_element

Insert a saved Brand Kit element (by id) onto a design. All layers get fresh ids. Position with anchor and/or x/y — same semantics as studio_create_text (neither → centered on the active page). Applied and persisted server-side.

Parameters

ParameterTypeRequiredDescription
templateIdstringConditionalId of the template to edit (from get-templates). Provide this or designId.
designIdstringConditionalId of the free-canvas design to edit. Provide this or templateId.
elementIdstringYesBrand Kit element id from get-brand-kit-elements
xnumberNoX in px. Top-left unless combined with anchor.
ynumberNoY in px. Top-left unless combined with anchor.
anchorstringNoNamed canvas anchor (top-left, center, bottom-right, …), or the point on the group that x/y refers to.

Response

Returns { ok: true, inserted: <n>, newIds: [...], name, placed: { x, y, width, height }, note }. Errors (document not found, element not found, no layers) are returned as an error string.


studio_save_to_brand_kit

Save one or more design elements as a reusable Brand Kit element. Control bindings and editor-only metadata are stripped and coordinates are normalized to the group origin, so the snippet is portable across templates. Animations are omitted unless includeAnimations is true.

Parameters

ParameterTypeRequiredDescription
templateIdstringConditionalId of the template to read from (from get-templates). Provide this or designId.
designIdstringConditionalId of the free-canvas design to read from. Provide this or templateId.
namestringYesName for the new Brand Kit element
categorystringNoOne of button, text, shape, graphic, badge, other (default other)
elementIdsstring[]YesElement ids to save (find them via studio_get_document)
includeAnimationsbooleanNoKeep in/out/keyframe animations on the snippet (default false)

Response

Returns { ok: true, id, name, category, savedLayers }.

Example

{
"tool": "studio_save_to_brand_kit",
"arguments": {
"templateId": "<template id>",
"name": "Primary CTA button",
"category": "button",
"elementIds": ["<element id>"]
}
}