Add custom print to cart
add_custom_to_cartPut a finished custom print (from generate_custom_print) into the cart as a garment and return the updated cart. Call it once get_studio_status reports done and the human has chosen product and size; for catalog designs use add_to_cart instead. product is the garment the human picked in get_studio_options (default mens_oversize_tshirt); size must exist for it — an error lists the sizes. Adding the same print on the same product and size again grows that line (max 99). An unfinished print returns 'print is not ready' and nothing is added. Then checkout goes as usual: set_shipping_address → get_order_preview → prepare_order.
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": {
"print_id": "<print_id>",
"size": "<size>"
},
"name": "add_custom_to_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | Quantity (default 1, max 99). | |
| size | Yes | Size label; must be available for the chosen product. | |
| product | No | Studio garment base, as chosen in get_studio_options (default mens_oversize_tshirt). | |
| print_id | Yes | Finished print id — get_studio_status must report status=done. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present instead of a cart when the call failed (bad index, unavailable size, ...). | |
| items | No | Cart lines in index order — this index is what update_cart_item takes. | |
| currency | No | ||
| subtotal | No | Sum of price x qty over all lines, USD. | |
| checkout_url | No | Cart page URL for the human. |