commerce_describe, tool schemas and commerce://guide;
reading this page is optional.
Additional custom still images
Prefer the six Brand apps below. When their fixed deliverables cannot provide a requested extra or custom still, usecommerce_image_models({model?}) to discover the existing AI Image Generator models and their exact schemas, including Nano Banana. Then call commerce_prepare_image({model, reason, shots}). Each of one to four shots has a label, prompt and model-specific params; reference images use the declared imageUrls or imageUrl field. Only one image per shot is permitted.
Preparation performs no paid dispatch. It returns a review, reference previews, estimated credits, expiry and fingerprint. Execute the exact approved plan with commerce_execute, then read commerce_status; outputs can be previewed and downloaded. No standalone video/audio tools or arbitrary workflow creation are exposed. There is no automatic model replacement or retry of an uncertain paid request. Direct MCP authorization must include the custom_image grant; Brand Assistant uses the authenticated workspace’s existing credits and saved approval.
Custom stills can also supply missing reference images for a Brand app. Inspect that app’s input requirements, generate the prerequisite, and pass its verified output URL into the app’s normal assessment/preparation flow. Use source_bindings: [{path: "product.images", value: [outputUrl], source: "generated", run_id: runId}] with the app’s actual reference field; the server checks run ownership and the exact completed image. Do not duplicate built-in prerequisites. Each paid plan needs its own review approval. The assistant selects suitable model/settings defaults, honors explicit model and portrait/landscape requests, and asks only about unresolved material choices. Input image dimensions and final app output constraints are separate.
Choose an app
Callcommerce_describe without arguments to discover your authorized apps. Then
call it with an app_key to read the current fields, required inputs, allowed choices,
person photos and output pack. Availability does not guarantee a generation will succeed.
Start with commerce_assess_request: record the original request, exact known inputs and explicit output_intent. Missing intent returns a correction hint when explicit scope is already recorded, otherwise a clarification; it never selects the full pack. Resolve all blockers before asking current questions using the saved intake_id/revision; unavailable or declined required fields block preparation. Then call this app’s preparation tool with only intake_id and revision. Image-only skips downstream video; video prerequisites are automatic and estimated once. Counts select existing deliverables, not guaranteed file counts. Internal AI models remain fixed.
The full packs above are available choices, not a requirement to generate every output. Read commerce_describe for current output IDs, availability, allowed choices and person photos. Input requirements depend on the selected outputs; intake returns the actual missing questions. A selected producer retains its authored number of files.
Product inputs contain productName and an images array; omit unknown optional product facts. For person_reference, send either
{source: "preset", preset_id: "ID from commerce_describe"} or {source: "upload", asset_url: "HTTPS image URL"}. Upload local files first. Do not copy example or saved sample photos into missing inputs.
Fashion Catalogue
Create a styled fashion shoot from front, back and side photos of the same garment. Choose a preset person or custom person photo, garment framing, location and day/night lighting. Full output pack: Cropped Image (image); Front (image); Back (image); Side (image); Full Body (image); Catalog video (video). Returns a prepared plan before generation; no Shopify connection to Lamina is required.Catalogue Photos and Video
Upgrade apparel listing media from a product name and photos. Choose a preset person or custom person photo; body description and location are optional. Full output pack: Front view (image); Side View (image); Close-up (image); Video (video). Returns a prepared plan before generation; no Shopify connection to Lamina is required.Product Ad Banners
Create campaign banners and animated variants using product photos, your logo, brand styling, headline, CTA and audience. Subheading and offer are optional. Choose this for banner creatives; choose a film app for a story ad. Full output pack: Ad 1 (image, 9:16); Ad 2 (image, 9:16); Ad 3 (image, 9:16); Video Ad 1 (video, 5 seconds); Video Ad 2 (video, 5 seconds); Video Ad 3 (video, 5 seconds). Returns a prepared plan before generation; no Shopify connection to Lamina is required.Virtual Try-On
Show an actual customer wearing apparel using their photo and product name/images. Use the customer photo; there is no preset-person choice. Full output pack: Selfie Output (image, 9:16); Full body Output (image, 9:16); Video (video). Returns a prepared plan before generation; no Shopify connection to Lamina is required.Apparel Ad Video
Create a clothing campaign film with music, logo and timed text overlays. Supply clothing product name/images, brand logo, target geography and audience. Full output pack: Ad video (video, 20 seconds). Returns a prepared plan before generation; no Shopify connection to Lamina is required.Listing Images & URL to Product Ad
Create a product ad from a listing URL and ordered listing photos. The authored app requests four scenes, feature text and music, without voiceover. No logo is required. The URL is passed as text; webpage retrieval and product-fact accuracy are not verified. Full output pack: Ad Video (video, 10 seconds, 9:16). Returns a prepared plan before generation; no Shopify connection to Lamina is required.
Note: The authored app receives the listing URL as text; it does not have verified webpage retrieval. Review generated feature claims against the real product.
Note: The authored video prompt mentions nine references. With fewer than eight listing photos, visual fidelity needs review; no sample photos are substituted.
Record the request before preparation
Contract 1.4 addscommerce_assess_request. Existing connections keep the same URL
and OAuth permissions; reload tool discovery. Only Brand MCP changes. General
Lamina MCP tools and app execution APIs retain their behavior.
- Call
commerce_describeif needed to choose the app and inspect its fields. - Call
commerce_assess_requestwithoperation: "create", the originalrequest_text,app_key, exactprovided_inputsand explicitoutput_intent. - Resolve all
blocking_reasonsandrecovery_actionsfirst. Ask only actionablequestions, notdeferred_questions. Update the saved intake withoperation: "update",intake_id,revision, a uniqueupdate_id, the new originalrequest_text, and nestedanswersfor missing app inputs only.app_keyandoutput_intentstay at the top level, not insideanswers. - On
ready_to_prepare, call the app’s preparation tool with onlyintake_idandrevision. Review its plan and estimate before execution.
needs_clarification; missing supported inputs produces
needs_input. blocked explains unavailable required inputs or unsupported requirements.
conflict explains invalid values or attempted overwrites. Only ready_to_prepare
can advance to preparation. support reports supported/partial/unsupported/unknown
separately from missing-input status.
Recover before asking more questions
Onconflict or blocked, questions is empty. deferred_questions lists inputs
that may be needed later; collecting those inputs alone will not resolve the
blocking reasons. Explain every remaining blocker, including unsupported user
requirements and unavailable assets. Never say that only a logo is missing while
another constraint still blocks the request.
For next_action.action: wait_for_user_change, state blocked_summary and stop.
Do not ask for the unavailable asset again or collect deferred inputs. Reassess only
when the user supplies new information or changes the request. A duration applies
only to video: do not invent one for static images. A genuine unsupported duration
remains blocked rather than being silently ignored.
If applied: false and retry_arguments are returned, the rejected operation made
no changes. Check the proposed encoding correction against the original request,
then resubmit it. Control keys such as app_key and output_intent belong at the
top level. Contradictory control values require correction, not a guessed choice.
An output_intent_hint records a narrowly recognized scope already in the user’s
message. Apply it with a top-level update instead of asking images versus video
again; the hint itself neither selects outputs nor prepares a plan. If you added
an exact-file requirement the user never requested, reassess without that mistaken
constraint while preserving actual inputs, scope and unavailable/declined fields.
Never remove a genuine user requirement merely to make preparation succeed.
Preserve inputs and explicit changes
URLs and array order are retained exactly. User-supplied URLs must appear in the recorded source message. Connector/upload URLs need matchingsource_bindings: [{path, value, source: "connector"}] (or "upload"). These
labels require matching declared host capabilities: store_connector for connector
results, or both file_read and upload for completed uploads. Do not add bindings
for URLs already supplied by the user. A binding cannot override a detectable
structured user value. These labels remain declarations, not proof. MCP cannot
detect an agent falsifying both the original message and its extracted values;
hosts should capture original messages directly rather than ask a model to rewrite them.
Answers fill missing paths. They never overwrite a known sibling. For an intentional
change, send changes: [{path, old_value_hash, value, source_instruction}] using the
hash returned by intake and the exact new user instruction. For output changes,
use the path output_intent and output_intent_hash. Mark required fields the user
cannot provide in unavailable_fields or declined_fields; explain the blocker
instead of asking again. A later real answer clears the corresponding blocker.
Intakes are scoped to the authenticated user and workspace and expire after 30 minutes.
Revision checks prevent concurrent overwrites. Retry the same update with its original
update_id and identical payload. A newer revision invalidates older unexecuted plans;
running work is not cancelled. Repeated preparation of the unchanged current revision
reuses the same valid plan. Changed app contracts require a fresh intake.
Legacy direct-input preparation calls return needs_intake with the next action,
not a full-pack fallback. Already-issued valid legacy plans keep their original expiry.
The operator’s existing Redis must be available; intake_unavailable stops preparation
rather than bypassing these protections.
Select images, video or particular outputs
Preserve every ID in an explicit structuredoutput_ids request. A missing or extra
ID produces a conflict; contradictory explicit lists need clarification. These checks
do not infer arbitrary prose lists. Only send requirements the user actually asked
for: selecting three deliverables does not request an exact three-file guarantee.
output_intent.mode is one of:
full_pack: explicitly request the complete app pack.all_imagesorall_videos: select only that media type’s deliverables.specific: supplyoutput_idsfrom this app’s live description.count: supplymedia_typeand a positivecount; select that many existing deliverables in catalogue order, with labels disclosed.
required_for_output_ids identifies relevant inputs. preview_output_ids only controls
thumbnails for existing results.
Pass constraints in requirements: aspect_ratio (numeric width/height),
duration_seconds, exact_file_count, custom_shots, history_lookup,
page_retrieval, or needs_upload. Unsupported/unknown constraints are reported
separately; do not promise arbitrary shot creation, page extraction or precise file counts.
Start a new intake if the user changes those constraints.
Declare host_capabilities conservatively: file_read, upload, browser,
store_connector, media_display. Lamina does not read local attachments. A host
without file reading and HTTP upload must request usable image URLs. Only apps with
a person-reference input offer presets. Delegated choices use the app’s real choices
and appear in review; they do not authorize invented product facts or extra outputs.
Product data and person photos
Product inputs requireproductName and one to ten image URLs. Other product facts
are optional; a Shopify token, product ID and store domain are not required.
heroImage is supplied.
Catalogue apps accept either a preset person or a custom person photo:
commerce_describe returns all named person photos. MCP Apps hosts can show the full
gallery; native image previews are limited to four per call. Pass app_key and
preview_preset_ids to preview others. Use returned IDs, not guessed names. If the user
delegates selection, choose a supported option and show the exact reference in the review.
“Model selection” here means the photographed person. Internal AI models, prompts,
providers, graph structure and generation settings are fixed, except for the inputs
explicitly exposed by the app. Try-On uses selfie_image_url for the actual customer.
Upload multiple files
For each local file, callcommerce_upload_asset with its name, MIME type, actual
byte size and public_upload_accepted: true. For example:
uploadUrl, using contentTypeHint as the Content-Type header. Only
after the upload succeeds, pass assetUrl in the appropriate input field. Repeat
for back/side images, logo and person reference; product images go in product.images.
Uploads support PNG, JPEG and WebP, up to 20 MiB each, with additional decoded-image
validation. They are public assets in shared configured storage. Private uploads
are not supported, and operators may disable uploading. Existing accessible URLs
on approved asset hosts can be used instead. The agent host needs file-reading and
HTTP-upload capability: MCP cannot read chat attachments by itself.
Prepare, review, generate and retrieve
- Read
commerce_creditsand describe the chosen app. - Assess the original request with exact inputs and explicit output intent. Answer only the saved intake’s questions, then prepare with its
intake_idandrevision. - When preparation returns
awaiting_approval, show its review, included outputs, estimated credits, plan ID and settings. Obtain user authorization to generate. - Call
commerce_executewith the exact returnedplanId,planFingerprint, a positive integermaxCreditscovering the estimate, and a uniqueidempotencyKey. - Poll
commerce_statuswith the returnedrunIdat bounded intervals until terminal. - Present the returned media using the gallery/player or your host’s native preview. Keep the named original-file links and inspect the media before judging quality.
commerce_describe({"app_key":"virtual_try_on"}),
then assess with the product object above plus selfie_image_url and the requested outputs; prepare from the returned intake. Preparation does
not start generation. Do not pass new inputs to execution; changed inputs require a
new prepared plan and review.
After an uncertain execution response, retry with the same key and unchanged
arguments, or check the known run. Brand MCP returns an existing matching run
even if its intake subsequently changed or expired. Current workspace access,
caller ownership and the original request must still match. A retry does not
start another generation. If a queued run failed to enter the queue, repair is
allowed only while its original execution checks still pass; otherwise the result
includes recovery_blocked. Check that run or contact support rather than using
a new key to start another paid run. New executions always require a current intake.
commerce_cancel requests cancellation; submitted work may still incur credits.
maxCredits checks the estimate, not a guaranteed provider-spend ceiling. Exact
per-run settled credits can be unavailable (spent: null); do not treat a workspace
balance change as the cost of one run. Output verification checks provenance and
media structure, not creative quality. Do not substitute old canvas outputs for
missing MCP results.
Brand MCP does not publish to Shopify. An agent can publish returned media through
its own Shopify connector when the user authorizes it.
Show photos and generated results
Brand MCP supplies three views: all person references, the exact selected/custom reference in the review, and the run’s actual output images/videos. The read-only viewer never generates media. Selecting a preset sends your agent a request to prepare the inputs for review. Video has playback controls and does not autoplay.
The host decides what it can render. Advertising the UI resource does not prove a
particular chat displayed it. Reload the MCP connection’s tool/resource discovery
after an update; the endpoint, tool names and existing OAuth grants are unchanged.
Claude, Codex and other agent clients
Brand MCP is a remote HTTP MCP service, not a Codex-only integration. Each client must complete Lamina OAuth for the intended workspace and retain the same access checks. Connect Claude Code with:/mcp in Claude Code to authorize. For Claude app/Desktop, add the same URL
as a custom remote connector and complete authorization.
- Claude app/Desktop: supports interactive MCP Apps. The Brand gallery uses the standard bridge rather than requiring OpenAI-specific APIs. Connector enablement, organization policy and the host’s sandbox still determine rendering. See Claude’s interactive connector guide.
- Claude Code/CLI: can call the same tools and consume native image results. An image reaching the model is not proof the terminal displays it to a human. Use the returned image files/links and a supported browser preview for video; do not promise an embedded terminal gallery. See Claude Code MCP setup and image results.
- Codex and other agents: use the capabilities actually available in that host: MCP Apps, native media previews, or named original links. Do not branch solely on the agent’s name or infer UI support from a successful tool call.
- Preserve
contentblocks of typeimageandresource_link. Printing onlystructuredContentor JSON drops the human-visible previews. Forward media with your host’s actual supported display API, not an invented helper. - Use
presentation.itemsfor labels, stable IDs and original URLs. A fifth image is still present when only four thumbnails are embedded. Callcommerce_statuswithrunIdand up to fourpreview_output_idsfrom that run to preview remaining images. inlinePreviewdistinguishesincluded,unavailable,not_requestedandnot_applicable. It describes the response, not whether the host displayed it.- Say “shown” only after producing a visible preview. Do not rely solely on remote image tables or download media to get around a host’s display restrictions.
- Refresh the same run to retrieve outputs; never regenerate just to fix display. A failed or cancelled run can contain usable partial media and must retain its status.
How agents receive instructions
- MCP initialization supplies server instructions.
tools/listsupplies tool descriptions and JSON input schemas. Full access currently exposes 15 tools when all six apps are ready and custom images are granted; grants and app readiness can reduce the list.- Read the
commerce://guideMCP resource for the same runtime guide. commerce_describesupplies current app-specific fields, choices and previews.
@uselamina/skill package adds written
guidance, but installing it does not configure MCP or authorize a workspace. Use the
live resource and schemas even when an installed skill is older.
Install the optional guidance into a project with:
npx @uselamina/skill@latest --update.
Presentation guidance is included from version 0.1.14. Update older installations explicitly. Native skill clients receive the
bundled Brand MCP reference; rule-only clients can read commerce://guide through MCP.
This is separate from the connection setup in the Brand MCP quickstart.
Troubleshooting
OAuth resource discovery is available at
https://app.uselamina.ai/.well-known/oauth-protected-resource/mcp/commerce.
Read and write scopes are lamina:creative:read and lamina:creative:write.
See MCP OAuth Install for the shared authorization flow.
Current tested limits
The 15 October 2026 live sample returned full MCP output packs for apps 1–5. Visual caveats included animated logo distortion, oversized film logos and cropped full-body framing. The previous app 6 failed at its final caption overlay after caption text was truncated. It has now been replaced by the listing-video app above. The replacement has passed contract and preparation checks; a fresh paid generation is not yet verified. These sampled results are not a guarantee across all inputs. Check final status and review outputs before publishing.Additional connection options
Client configuration
For clients usingmcpServers configuration:
App recipe media plans
WhenBRAND_COMMERCE_RECIPES_ENABLED=true, call commerce_read_recipe with app_key and output_ids from commerce_describe to read only those outputs and their upstream instructions. Concatenate bundle_json_chunks in order across every next_offset page; parse the combined JSON only after next_offset is null. Each page holds up to four 6,000-character chunks. The bundle contains sections, a deduplicated models dictionary and output-to-section mappings. The envelope includes source_hash, version, omitted_sections and complete. Reauthorize and check the current source on every page. Legacy outline paging and section_ids detail reads remain supported; output_ids and section_ids are mutually exclusive. Authored creative controls, templates and prompt-builder instructions are reference data. Connected cached outputs are excluded. Access remains restricted to the six allowlisted open-source apps and verified source hashes.
commerce_prepare_recipe takes app_key, source_hash, request_key, summary, brief, sources and ordered steps. Sources have a stable ID, declared role and verified image URL; generated sources carry an owned run_id or chat asset_id. Steps specify an app recipe_section, image/video kind, supported model, exact prompt/settings, label and output role. Extra stills without an app section use nano-banana-2. Each reference binds a model URL field to a source_id or earlier image step_id. Unknown pricing, unsupported settings, forward dependencies and undeclared media are rejected before preparation.
An optional assembly names an app editor section and an ordered list of at least two clip_steps. It concatenates only those reviewed generated clips through the existing deterministic video editor. No LLM, narration or additional media is generated by assembly. Every paid step is included in the review estimate.
Preparation atomically saves one immutable plan per principal/request key. Reusing the key with changed arguments conflicts. The existing commerce_execute and commerce_status tools handle exact approval, workspace billing, idempotent replay, progress and verified partial/final outputs. App graphs are never edited or executed by this route. The six legacy app preparation tools remain exposed for existing MCP integrations; the recipe-enabled assistant uses the direct-media route.
Independent steps in an approved Brand recipe may run concurrently when the operator enables BRAND_RECIPE_PARALLEL_ENABLED. BRAND_RECIPE_MAX_CONCURRENCY defaults to three and is capped at four. Every required reference must finish and verify before a dependent starts. Shared references are generated once and bound by step ID. In-flight commitments count against the approved ceiling. Cancellation checks all active jobs and preserves late completed outputs and actual charges. Unknown dispatch outcomes are not automatically repeated. Disabling parallelism drains all already-active jobs while limiting new starts to one.