# Remove from Xiaomi UK cart

Automatically remove from Xiaomi UK cart on mi.com. Remove one line from the Xiaomi UK shopping cart of this browser and see what is left.

- Site: mi.com
- Address: `reduck/mi.com/remove_from_cart`
- Updated: 2026-12-01 (v1)
- Author: Reduck AI (reduck)

## About

Use it to clean the cart after a review with the List Xiaomi UK cart items script. It removes the whole line, whatever its quantity. If the line changed since the review (item, quantity or price) or is not in the cart, it removes nothing and the run fails. No account is needed.

## Run it

Ask an AI agent connected to Reduck over MCP (`https://mcp.reduck.ai/mcp`) to run `reduck/mi.com/remove_from_cart`, or run it from a terminal:

```bash
npx @reduck-ai/cli@latest run --script reduck/mi.com/remove_from_cart
```

## Input

- `line_id` (string, required): The line_id of the line, from List Xiaomi UK cart items (e.g. 4223703273_0_buy).
- `review_hash` (string, required): The review_hash of that line, from List Xiaomi UK cart items.

## Output

- `count` (integer, required)
- `lines` (array, required)
- `removed` (boolean, required)
- `total` (number | null, optional)
- `currency` (string, optional)
- `delivery` (number | null, optional)
- `subtotal` (number, optional)

## FAQ

### What does "Remove from Xiaomi UK cart" do?

Remove one line from the Xiaomi UK (mi.com/uk) shopping cart of this browser, whatever its quantity, by its line id and the review_hash that List Xiaomi UK cart items gives for it, and return what is left. The review_hash makes sure the line is still the one that was reviewed (same item, quantity and price): when it changed, or the line is not in the cart, nothing is removed and the run fails with an error.

### How do I automatically remove from Xiaomi UK cart on mi.com?

Ask an AI agent connected to Reduck to run reduck/mi.com/remove_from_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/mi.com/remove_from_cart

### Is there a mi.com API to remove from Xiaomi UK cart?

You do not need one. "Remove from Xiaomi UK cart" drives the real mi.com pages in a browser, so it works whether or not mi.com offers an API for this.

### What information do I need to provide?

Required: line_id, review_hash.

### What does it return?

It returns count, lines, total, removed, currency, delivery, subtotal.

### Do I need to be logged in to mi.com?

No. It only uses pages of mi.com that are reachable without signing in.

### Does it change anything on mi.com, or only read data?

It makes changes on mi.com, like sending, posting, booking or buying something.

### How do I run it?

Ask an AI agent connected to Reduck to run reduck/mi.com/remove_from_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/mi.com/remove_from_cart

### Who maintains it?

It is one of Reduck's official scripts.

Source: https://reduck.ai/explore/scripts/reduck/mi.com/remove_from_cart
