Add a part to a cart
add_to_cartPut one more part in a cart. Name it ONE way: quote_id (a quote you already have — its shops are not asked again, and the part arrives configured and picked exactly as that quote is), or file_id or file_url (a design that has no quote yet — it gets one ordinary quote, priced exactly as get_fabrication_quote would price it). A cart holds at most 24 parts. Returns the whole cart. HOW A CART WORKS: each part in a cart IS a quote — its material, finish, quantity, rules and its pick (selection) live on that part's quote, and nothing is kept twice. To change a part, call refine_quote on its quote_id and pass cart_item_id: the cart follows the part to the new quote by itself. To pick the option to order for a part, store the pick on its quote (refine_quote selection). The cart_id is the only key to the cart — whoever holds it can read and change it — so give it only to the user it belongs to, and never put it in a link you did not get from the network.
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": {
"cart_id": "<cart_id>"
},
"name": "add_to_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | The part's name as the user knows it. Default: the file's own name | |
| cart_id | Yes | The cart to add to (cart_…) | |
| file_id | No | A design file the network already holds (f_…): it gets one ordinary quote | |
| file_url | No | A public URL of the design: it is fetched and gets one ordinary quote | |
| quote_id | No | A quote you already have: the part arrives configured and picked as that quote is, and no shop is asked again |