Add to Cart
add_to_cartFull Description
Sets the quantity of a product variant in the cart. If the variant is already in the cart, the given quantity replaces the existing quantity — it does not add to it. Use when the user has picked a specific size/colour and asked to add it, e.g. 'add this to my cart', 'I'll take 2 of the black medium', 'make it 3 instead of 2'. For 'add one more' or 'increase by N': first call get_cart to read the current quantity, then call add_to_cart with quantity = current + N. Calling with quantity = N alone will overwrite the existing count, not add to it. For removal or setting quantity to zero, use remove_from_cart — this tool requires quantity ≥ 1.
Parameters (3 required)
product_idstringThe Pine Labs product ID (e.g. PL_Sladorn_0001), obtained from search_products results
quantityintegerQuantity to set for this variant. Must be 1 or more. To remove an item entirely, use remove_from_cart.
variant_idstringThe Shopify variant ID for the specific size/colour, obtained from search_products results