Skip to main content
Glama
vuluu2k

WebCake Storefront MCP

by vuluu2k

create_product

Create storefront products with name, price, images, and stock; add attributes and variations for multi-SKU items so product grids and sliders can display real merchandise.

Instructions

Create a product so the storefront has real merchandise (grid-product / slider-product bindings need this). Simple use: pass name + price (+ images, category_ids). One default variation with the price/stock is created for you. Advanced use: pass attributes (e.g. Color/Size) + variations for a multi-SKU product. Images must be HOSTED URLs — get them from search_images or upload_images first. The backend generates id, slug and publishes the product. SEO: set it afterwards with update_product({ product_id, seo }).

Input Schema

NameRequiredDescriptionDefault
skuNoSKU / custom_id for the simple case (auto-generated if omitted)
nameYesProduct name
priceNoSelling price (used when you don't pass variations). Required unless variations are given.
stockNoStock quantity for the simple single-variation case
imagesNoHosted image URLs (search_images/upload_images). First image becomes the product thumbnail.
attributesNoVariant axes, e.g. [{name:'Color',values:['Đen','Trắng']},{name:'Size',values:['S','M','L']}]
variationsNoExplicit per-SKU variations. Omit to auto-build one from price/stock/sku.
descriptionNoFull product description (HTML allowed) — binds to product::description on the detail page.
category_idsNoProduct category IDs to file the product under (from create_product_category / list_categories)
original_priceNoList/compare-at price for the simple single-variation case
short_descriptionNoShort description / tagline (HTML allowed) — binds to product::short_description on cards + the detail page. Set this so cards aren't blank.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.31.8

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare write/non-destructive; the description adds real behavioral context the schema doesn't state: the backend auto-generates id and slug, auto-publishes, and synthesizes one default variation with the price/stock for the simple case. It does not cover permissions or error/rollback behavior, so it falls just short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the simple/advanced split, then constraints, then SEO follow-up in short labeled clauses; density is high and little is wasted. It runs slightly long with the SEO and images reminders, but each clause carries actionable content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter create tool with no output schema, it covers the two viable calling patterns, required-vs-optional inputs, image sourcing prerequisite, and the auto-generation/publish side effects an agent must anticipate. Nothing essential to a correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds the conditional relationship that price is only needed when variations are omitted and that images come specifically from search_images/upload_images. It clarifies the two mutually exclusive invocation shapes rather than just restating fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (create a product) and immediately differentiates itself from siblings by framing the simple vs advanced paths and pointing SEO changes at update_product. An agent can distinguish this from update_product, delete_product, and create_product_category without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly splits 'Simple use' (name + price + images + category_ids) from 'Advanced use' (attributes + variations), tells the agent to call search_images/upload_images first for hosted URLs, and routes SEO to update_product afterwards. Both the when and the alternative are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools