> ## Documentation Index
> Fetch the complete documentation index at: https://developers.gotolstoy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Brand, products and media

> Tools that read the workspace's brand profile, product catalog, media Library, saved models, templates and projects.

## get\_brand\_context

Reads the brand profile of the store connected to this workspace: name, website, description, target audience, logos, colors, fonts, social links, size guide and model sizes. The Tolstoy Agent and the storefront widgets use this profile. brandContext is null when the store has none yet.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {},
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## search\_products

Searches the product catalog of the store connected to this workspace. Each product carries its variants, with the externalProductId and externalVariantId the store's own platform uses. A catalog search pages with nextCursor. collectionId lists one Shopify collection, and bestSelling ranks the catalog by recorded sales; neither takes searchTerm, filters or cursor. A store with no recorded sales has no best sellers.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "searchTerm": {
>       "type": "string",
>       "minLength": 1,
>       "description": "Words matched fuzzily against product titles, handles, types, vendors and tags."
>     },
>     "filters": {
>       "type": "object",
>       "properties": {
>         "productType": {
>           "type": "array",
>           "items": {
>             "type": "string"
>           },
>           "description": "Product types; a product matches any of them."
>         },
>         "category": {
>           "type": "array",
>           "items": {
>             "type": "string"
>           },
>           "description": "Product categories; a product matches any of them."
>         },
>         "tags": {
>           "type": "array",
>           "items": {
>             "type": "string"
>           },
>           "description": "Product tags; a product matches any of them."
>         },
>         "sku": {
>           "type": "array",
>           "items": {
>             "type": "string"
>           },
>           "description": "Variant SKUs, matched exactly."
>         }
>       },
>       "additionalProperties": false
>     },
>     "collectionId": {
>       "type": "string",
>       "minLength": 1,
>       "description": "A Shopify collection id. Returns the products of that collection, up to the first 250."
>     },
>     "bestSelling": {
>       "type": "boolean",
>       "description": "Returns the store's products ranked by recorded sales volume, best seller first."
>     },
>     "limit": {
>       "type": "integer",
>       "minimum": 1,
>       "maximum": 500,
>       "description": "Maximum products to return. Defaults to 10."
>     },
>     "cursor": {
>       "type": "string",
>       "minLength": 1,
>       "description": "The nextCursor of the previous page."
>     }
>   },
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## connect\_products

Opens the Tolstoy panel where the user connects the workspace's product catalog: a Shopify store, which its owner approves on Shopify, a CSV or TSV product file, a product feed URL, or a source the Tolstoy platform connects. Product tools read the connected catalog. The result states the workspace's current catalog.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {},
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## search\_media

Searches the workspace's Library: its finished videos and images, uploaded, imported from social platforms, or generated, newest first. AI drafts are generated items not yet published. Each item has one id, its MediaDB file with URLs and renditions, its tagged products for this store, and originalUrl, the stored source file, when that file can be served. Pages with nextCursor.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "search": {
>       "type": "string",
>       "minLength": 1,
>       "maxLength": 256,
>       "description": "Text contained in the item name or in the username of the creator it came from."
>     },
>     "mediaType": {
>       "type": "string",
>       "enum": [
>         "video",
>         "image"
>       ]
>     },
>     "aiDraft": {
>       "type": "boolean",
>       "description": "true returns only unpublished AI drafts; false returns everything except them."
>     },
>     "favorite": {
>       "type": "boolean",
>       "description": "true returns only items marked as favorite."
>     },
>     "limit": {
>       "type": "integer",
>       "minimum": 1,
>       "maximum": 200,
>       "description": "Maximum items per page. Defaults to 20."
>     },
>     "cursor": {
>       "type": "string",
>       "minLength": 1,
>       "description": "The nextCursor of the previous page."
>     }
>   },
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## get\_media

Reads Library items by id, as they are saved now. Each item has its status, its MediaDB file with URLs and renditions, its tagged products and playlists for this store, its creator and expiration date, and originalUrl, the stored source file, when that file can be served. An expired item is hidden from the Library and from storefront widgets. Ids this workspace cannot see are left out.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "ids": {
>       "type": "array",
>       "items": {
>         "type": "string",
>         "format": "uuid"
>       },
>       "description": "Library item ids."
>     }
>   },
>   "required": [
>     "ids"
>   ],
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## search\_fashion\_models

Lists the workspace's saved models, in name order: reusable people with reference images, identified by id (the aiModelId), plus Tolstoy's default models (isDefault). A model is ready, or still generating its images. Each has its name, description, gender, age group, measurements, a previewUrl, and its reference images as full-size URLs (media\[].mediaReference), each marked with the view it shows (variationType: main, pose or environment). Names can repeat.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "query": {
>       "type": "string",
>       "minLength": 1,
>       "description": "Text contained in the model name, case-insensitive."
>     }
>   },
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## search\_templates

Searches content templates: proven recipes for generating an image or a video, each a fixed prompt with example media. Tolstoy publishes global templates, and a workspace can save its own. Without filter, the search covers Tolstoy's global templates. Returns summaries with a preview URL; the prompt itself is read per template.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "search": {
>       "type": "string",
>       "description": "Keyword matched against template titles and descriptions."
>     },
>     "outputType": {
>       "type": "string",
>       "enum": [
>         "image",
>         "video"
>       ]
>     },
>     "filter": {
>       "type": "string",
>       "enum": [
>         "popular",
>         "new",
>         "staffPicks",
>         "accountSaved"
>       ],
>       "description": "A curated list, or accountSaved for this workspace's own templates."
>     },
>     "templateCategory": {
>       "type": "string",
>       "enum": [
>         "product_shot",
>         "on_model",
>         "lifestyle",
>         "detail",
>         "creative_direction",
>         "video_product",
>         "video_lifestyle",
>         "video_ad"
>       ]
>     },
>     "limit": {
>       "type": "number",
>       "minimum": 1,
>       "maximum": 20,
>       "default": 10
>     }
>   },
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## get\_template

Reads one content template: its full prompt verbatim, its output type, aspect ratio and category, its Remotion template ids, and its example media as URLs. A template is a proven recipe parameterized over its inputs, typically a model (the identity) and a product (the item featured); placeholders such as \{product\_image} stand for the subject of each run. The prompt is locked: a run passes it as written as the prompt of one generation, with the run's model and product images as its references. Where the template conflicts with the request, the user's own words come first, then the brand profile, then the template's defaults. A prompt that lays out several stages, review or approval rounds, or child chats, or a template with Remotion ids, runs in the Tolstoy platform. The example media show what the template makes; they are not references for a new run.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {
>     "templateId": {
>       "type": "string",
>       "description": "The template id."
>     }
>   },
>   "required": [
>     "templateId"
>   ],
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```

## search\_projects

Lists the workspace's projects and the folders inside them, each with its folderId and platform link. A project is a folder with no parentFolderId. Work done in a project uses its context files and the brand contexts it names.

> **Input schema**
>
> ```json theme={null}
> {
>   "type": "object",
>   "properties": {},
>   "additionalProperties": false,
>   "$schema": "http://json-schema.org/draft-07/schema#"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.