Zum Hauptinhalt springen

Asset tools

Tools for browsing, retrieving, and generating assets (images, videos, audio) in the organization's asset library.

get-assets

Search and retrieve assets from the library with optional filters.

Use search for natural-language queries

This tool supports server-side natural-language search — pass what the user asked for (e.g. "images of old people", "beach sunset", "hotel lobby at night") directly into the search parameter. It runs a semantic search over each asset's AI-generated visual description, name, and tags. Don't call get-assets without search and then manually scan the returned visualDescription fields yourself — the server-side search is more accurate and avoids paging through the entire library.

Parameters

ParameterTypeRequiredDescription
searchstringNoNatural-language search query, e.g. "images of old people". Matches semantically against name, visual description, and tags — pass user phrasing straight through instead of filtering results yourself
collectionIdstringNoFilter by collection ID
tagsstringNoComma-separated tag IDs (use get-tags to get IDs)
uncategorizedbooleanNoOnly return assets without a collection
assetTypestringNoFilter by type: image, audio, or video
insertProductIdstringNoFilter by associated product ID
limitnumberNoPage size, 1–200 (default 50, newest first)
offsetnumberNoNumber of assets to skip for pagination (default 0)
Ordering with search

When search is provided, results are ranked by relevance (best match first) instead of newest first.

Response

FieldTypeDescription
assetsarrayList of assets (this page)
assets[].idstringUnique asset identifier
assets[].namestringAsset name
assets[].assetUrlstring | nullFull-resolution URL
assets[].previewUrlstring | nullPreview/thumbnail URL
assets[].statusstringProcessing status
assets[].visualDescriptionstring | nullAI-generated description
assets[].assetTypestringimage, audio, or video
assets[].collectionobject | null{ name } if assigned
assets[].insertProductsarray[{ name }], linked products
assets[].tagsarray[{ name }], assigned tags
assets[].createdAtstringISO date
assets[].updatedAtstringISO date
returnednumberNumber of assets in this page
limitnumberPage size used
offsetnumberOffset used
hasMorebooleantrue if the page was full; call again with offset += limit
Pagination

Large libraries are paged to keep responses fast. When hasMore is true, request the next page by increasing offset by limit (e.g. offset: 50, then 100, …).

Example

{
"tool": "get-assets",
"arguments": {
"search": "images of old people",
"assetType": "image"
}
}

get-asset

Retrieve a single asset by ID with full metadata and relationships.

Parameters

ParameterTypeRequiredDescription
idstringYesAsset identifier

Response

FieldTypeDescription
asset.idstringUnique identifier
asset.namestringAsset name
asset.assetUrlstring | nullFull-resolution URL
asset.previewUrlstring | nullPreview URL
asset.statusstringProcessing status
asset.visualDescriptionstring | nullAI-generated description
asset.assetTypestringimage, audio, or video
asset.collectionobject | null{ id, name }
asset.tagsarray[{ id, name, colorScheme }]
asset.createdAtstringISO date
asset.updatedAtstringISO date

Example

{
"tool": "get-asset",
"arguments": {
"id": "ast_xyz789"
}
}

get-tags

List all tags for the organization, including how many assets each tag has.

Parameters

None.

Response

FieldTypeDescription
tagsarrayList of tags
tags[].idstringTag identifier
tags[].namestringTag name
tags[].colorSchemestringDisplay color
tags[].assetCountnumberNumber of assets with this tag
tags[].createdAtstringISO date
tags[].updatedAtstringISO date
totalnumberTotal number of tags

generate-asset

Generate a new image using AI. The generated asset is added to the organization's asset library.

Parameters

ParameterTypeRequiredDescription
promptstringYesDescription of the image to generate
modestringNoGeneration mode: stock (generic), product (product-focused), or productContent
productImageTypestringNoFor product modes: packaging or content
insertProductIdsstring[]NoUp to 3 product IDs to use as reference (for product modes)

Response

FieldTypeDescription
asset.idstringID of the generated asset
asset.namestringAuto-generated name
asset.promptstringThe prompt used
asset.statusstringProcessing status (may be processing initially)
asset.assetTypestringAlways image
asset.createdAtstringISO date
asset.updatedAtstringISO date
messagestringStatus message

Example

{
"tool": "generate-asset",
"arguments": {
"prompt": "A modern office workspace with a laptop and coffee, warm lighting, professional photography style",
"mode": "stock"
}
}

upload-asset

Upload a new image into the organization's asset library so it can be inserted into a design. Provide either a publicly fetchable imageUrl (the server downloads it) or inline base64 data with a mimeType. By default the asset is not filed into any collection (it stays in the library root); pass an optional collectionId to place it in a specific collection. The upload returns a persistent assetUrl.

Supported formats: jpeg, png, gif, webp, svg. Inline base64 uploads are capped at 12 MB; use imageUrl for larger files.

Parameters

ParameterTypeRequiredDescription
imageUrlstringOne of imageUrl/base64Direct URL the server downloads and stores
base64stringOne of imageUrl/base64Base64-encoded image bytes (a data: prefix is accepted)
mimeTypestringNoMIME type for base64 data, e.g. image/png (default image/png)
namestringNoDescriptive asset name, e.g. hero-mountains
collectionIdstringNoExisting collection id to file the asset into. Omit to leave it in the library root. Use get-collections to discover ids or create-collection to make a new one

Response

FieldTypeDescription
okbooleantrue on success
asset.idstringNew asset ID
asset.namestringStored asset name
asset.assetUrlstring | nullPersistent URL; use this to insert the image
asset.previewUrlstring | nullPreview URL
asset.assetTypestringAlways image
asset.statusstringProcessing status
notestringHint on how to place it in the editor

On failure the tool returns an error string (e.g. unfetchable URL, unsupported type, too large).

Example

{
"tool": "upload-asset",
"arguments": {
"imageUrl": "https://example.com/photo.jpg",
"name": "campaign-hero"
}
}
Insert it into a design

After uploading, place the image in a Studio document with studio_call (target it with templateId or designId):

{
"tool": "studio_call",
"arguments": {
"templateId": "<template id>",
"tool": "studio_create_image",
"args": { "source": "custom", "customUrl": "<assetUrl from upload-asset>", "name": "campaign-hero" }
}
}