get_cart

Get the cart including items, shipping options, discount info, and checkout url for a given cart id

Tool Parameters

Shopify Store Configuration

Enter the Shopify store domain that has the MCP Storefront server enabled

This helps track which user requests lead to specific tool evaluations.

Import from Conversation

Paste a conversation JSON to automatically extract tool calls and their user prompts.

Shopify cart id, formatted like: gid://shopify/Cart/c1-66330c6d752c2b242bb8487474949791?key=fa8913e951098d30d68033cf6b7b50f3

Evaluation History

successMCPsquadshop-9351.myshopify.com
12/16/2025, 2:17:49 PM341ms
ID: 5730bf8a...
No notes added
View details
Input:
{
  "cart_id": "gid://shopify/Cart/hWN6V2tdTtisEUvLltLWgXg6?key=8fed8f024f6b3b355dde5415d22962aa"
}
Output:

Instructions

Ask if the customer has found everything they need. If they're ready to check out: 1. First help them complete their cart with any additional items they might need 2. If the cart contains shipping-eligible items, prompt them to select a shipping option from those available 3. Ask if they'd like to add any special instructions or notes to their order (optional) 4. Check if they have any discount codes or gift cards they'd like to apply (only if they mention them) 5. Assist them in navigating to checkout by providing a markdown link to the checkout URL Remember that buyer information helps calculate accurate shipping rates but isn't required to proceed.
View Raw Data
{
  "instructions": "Ask if the customer has found everything they need. If they're ready to check out:\n\n1. First help them complete their cart with any additional items they might need\n2. If the cart contains shipping-eligible items, prompt them to select a shipping option from those available\n3. Ask if they'd like to add any special instructions or notes to their order (optional)\n4. Check if they have any discount codes or gift cards they'd like to apply (only if they mention them)\n5. Assist them in navigating to checkout by providing a markdown link to the checkout URL\n\nRemember that buyer information helps calculate accurate shipping rates but isn't required to proceed.\n",
  "cart": {
    "id": "gid://shopify/Cart/hWN6V2tdTtisEUvLltLWgXg6?key=8fed8f024f6b3b355dde5415d22962aa",
    "created_at": "2025-12-16T14:15:30.175Z",
    "updated_at": "2025-12-16T14:15:30.175Z",
    "lines": [
      {
        "id": "gid://shopify/CartLine/07a075da-3ed1-45a0-a115-98e9ea4cf678?cart=hWN6V2tdTtisEUvLltLWgXg6",
        "quantity": 1,
        "cost": {
          "total_amount": {
            "amount": "110.0",
            "currency": "GBP"
          },
          "subtotal_amount": {
            "amount": "110.0",
            "currency": "GBP"
          }
        },
        "merchandise": {
          "id": "gid://shopify/ProductVariant/52970704634120",
          "title": "White / x small (XS)",
          "product": {
            "id": "gid://shopify/Product/10645833908488",
            "title": "Clothier printed cotton-jersey T-shirt"
          }
        }
      }
    ],
    "delivery": {},
    "discounts": {},
    "gift_cards": [],
    "cost": {
      "total_amount": {
        "amount": "110.0",
        "currency": "GBP"
      },
      "subtotal_amount": {
        "amount": "110.0",
        "currency": "GBP"
      }
    },
    "total_quantity": 1,
    "checkout_url": "https://squadshop-9351.myshopify.com/cart/c/hWN6V2tdTtisEUvLltLWgXg6?key=8fed8f024f6b3b355dde5415d22962aa"
  },
  "errors": []
}
successMCPsquadshop-9351.myshopify.com
12/16/2025, 2:16:01 PM341ms
ID: ddbb8995...
No notes added
View details
Input:
{
  "cart_id": ""
}
Output:
Could not parse MCP response, showing raw content:
Invalid cart_id format. Expected a Shopify Cart GID (e.g., 'gid://shopify/Cart/Z212345?key=123456789').
successMCPsquadshop-9351.myshopify.com
12/16/2025, 2:12:27 PM331ms
ID: c53b18c5...
No notes added
View details
Input:
{
  "cart_id": "gid://shopify/Cart/c1-66330c6d752c2b242bb8487474949791?key=fa8913e951098d30d68033cf6b7b50f3"
}
Output:
Could not parse MCP response, showing raw content:
Cart does not exist for gid://shopify/Cart/c1-66330c6d752c2b242bb8487474949791?key=fa8913e951098d30d68033cf6b7b50f3
errorMCPyour-store.myshopify.com
11/13/2025, 7:38:49 AM0
ID: 0c15fb8a...
No notes added
View details
Input:
{
  "cart_id": "gid://shopify/Cart/example-cart-id?key=example-key"
}
Error:

Unable to connect to MCP server at your-store.myshopify.com: Error POSTing to endpoint (HTTP 401):