Create products
create_productsAdds products to the shop's Products collection, like create_items with the product fields and checks. Each product needs a name and a price in the shop's currency (24 or 24.50; a whole number for a currency without cents); optional: summary, compareAtPrice (the "was" price), options as simple text ("Size: Small, Medium, Large (+5); Colour: Sand, Grey", a price change in brackets), stock (empty: no limit), image and gallery (site paths like /images/mug.webp, or, on React template sites only, the themed placeholder /placeholders/square.svg with alt text; on plain HTML sites leave it out and the card shows a plain box; never stock photos), category, description (Markdown), active (false: not for sale), slug, draft (default false: for sale; true keeps it out of the shop), interval (month or year: a membership billed again every month or year, bought on its own and by card only; leave it out for a one-time product; on a plain HTML site it is a subscription only, with no member role or members-only pages). Every product is checked first and nothing is written when one can't be sold as written (each problem is listed). Makes the Products collection from its starter when the site has none, and adds the fields an older Products collection lacks (only adds, never changes a field). Refuses with plan_limit when the products for sale would pass the plan's limit (say the limit and that the owner can upgrade in Billing). For other fields or changes use update_item, list_items and delete_items on the same collection.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"products": "<products>",
"projectId": "<projectId>"
},
"name": "create_products"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Optional branch; default the branch the workspace has open | |
| products | Yes | ||
| projectId | Yes | Project id from list_projects |