Remove a product from a cart
cart_remove_itemRemoves a product from an anonymous Trailhead Supply cart and returns the whole cart. Removing a product the cart does not hold leaves the cart as it is.
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_token": "<cart_token>",
"product": "<product>"
},
"name": "cart_remove_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locale | No | Answer language: en (default en). Names, labels and URLs follow it. | |
| product | Yes | The product: its public_id from an earlier answer, its page URL or slug on the store's website, or the manufacturer model number. | |
| cart_token | Yes | The cart_token an earlier cart answer returned. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| total | No | What the cart costs before delivery, discounts taken off; the store's website shows the same. | |
| limits | Yes | ||
| cart_url | Yes | Opens the store's website with these products in the shopper's own cart, where they review and order; nothing is ordered before that. | |
| currency | Yes | ||
| subtotal | Yes | Before delivery and the bundle saving. | |
| truncated | No | Present and true only when the answer outgrew the size budget and its last list items were left out; ask narrower to see them. | |
| cart_token | Yes | Pass it to the other cart tools. A secret: whoever holds it can change this cart. | |
| expires_at | Yes | ISO 8601; every change pushes it back. | |
| item_count | Yes | Units over all lines. | |
| answer_type | No | What this answer is, for rendering. | |
| vat_included | Yes | ||
| delivery_hint | Yes | How delivery is charged, in the answer language. | |
| discount_total | No | The bundle saving; 0 without a whole bundle. |