ucp_add_items_to_checkout
Append line items to an existing incomplete UCP checkout session. If a product_id already exists its quantity is incremented; new product_ids are appended. Use instead of ucp_update_checkout when you want to preserve existing items. Use ONLY for sessions created with ucp_create_checkout; for the standard flow use create_cart. Checkout guide: read the MCP resource trusteed://guides/checkout.
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": {
"checkout_id": "<checkout_id>",
"line_items": "<line_items>"
},
"name": "ucp_add_items_to_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | UCP request metadata. meta['ucp-agent'].profile = URL of the platform profile; it must be an https URL without credentials (at most 2048 characters). | |
| agent_key | No | Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header. | |
| line_items | Yes | Items to add or merge into the checkout | |
| checkout_id | Yes | UCP checkout session ID (valid UUID) | |
| idempotency_key | No | REQUIRED for this write unless sent as the `Idempotency-Key` header or `params._meta["trusteed/idempotency-key"]`. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation. | |
| xyz.trusteed.shopping.buyer_intent | No | Optional. What the person asked for, as structured constraints with who said each one (user_stated or agent_inferred) and the substitution policy. Safe to send: where the store compares it with the cart, a purchase that differs can stop before anything is charged. It is the agent's account of the request, not proof of what the person said. |