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. 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[].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 and the group is 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-design post to edit. Provide this or templateId.
elementIdstringYesBrand Kit element id from get-brand-kit-elements

Response

Returns { ok: true, inserted: <n>, newIds: [...], 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.

Parameters

ParameterTypeRequiredDescription
templateIdstringConditionalId of the template to read from (from get-templates). Provide this or designId.
designIdstringConditionalId of the free-design post 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)

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>"]
}
}