create_cart
Build a buyer cart from chosen part IDs and quantities; returns a checkout URL, line items, and subtotal so the buyer can review and pay.
Instructions
Create a cart and get a checkout link for the buyer. Use it only after the buyer has chosen the parts and quantities. Takes one to twenty {id, quantity} items and returns checkout_url, lines and the subtotal; amounts come in dollars and, authoritatively, in cents. The buyer opens checkout_url, reviews the cart and pays there: you never pay and cannot. Refuses unknown parts, out-of-stock parts and quantities above the shelf (a part sent on several lines counts once, with the lines added up); backordered parts are accepted and flagged.
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": {
"items": "<items>"
},
"name": "create_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | One to twenty parts with quantities. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | What to tell the buyer. | |
| lines | Yes | The cart lines. | |
| cart_id | Yes | Identifier of the cart; the same items always give the same identifier. | |
| currency | Yes | Currency of every amount. | |
| checkout_url | Yes | Where the buyer opens the cart and pays. Give this link to the buyer; never try to pay. | |
| subtotal_usd | Yes | Sum of the line totals in US dollars, for display; shipping and tax are added at checkout. | |
| subtotal_cents | Yes | Sum of the line totals in whole cents; authoritative. |