While creating Cart using update_cart from shopify MCP its giving the checkout url empty

Hey @Vedant_Dere,

I’ve dug into this and found the issue. The Storefront MCP documentation is missing some parameter names that the MCP server expects. You followed the docs correctly based on what is there, but the tool you need isn’t in the docs.

The example in our documentation shows using a lines array with merchandise_id, but the actual MCP server uses add_items with product_variant_id. You can verify this yourself by calling the tools/list method on your store’s MCP endpoint to see the actual schema.

{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
}

Here’s the corrected request structure:

payload = {
    "jsonrpc": "2.0",
    "method": "tools/call",
    "id": 1,
    "params": {
        "name": "update_cart",
        "arguments": {
            "add_items": [  # Changed from "lines"
                {
                    "product_variant_id": "gid://shopify/ProductVariant/47284154400920",  # Changed from "merchandise_id"
                    "quantity": 2
                }
            ]
        }
    }
}

The key changes are replacing lines with add_items and merchandise_id with product_variant_id. The server was silently ignoring your lines parameter because it didn’t recognize it, which is why you were getting empty carts with a 200 status.

I’m noting this documentation gap so we can get it fixed. Thanks for the detailed reproduction code, it helped track this down quickly.