Skip to main content
Glama

Create cart

create_cart
Destructive

Creates a cart drawer the way the app's editor starts one: in the store's colors and language, with trust badges that state the store's facts, then applies any changes. A Plus store's first cart goes live at once. Every other new cart is off until set_cart_status switches it on, which replaces the live cart. Look up product and variant ids with search_products first. When the changes add reward tiers, tell the merchant what the result's rewards.tell_merchant says: each reward, its threshold and discount, and whether the Shopify automatic discount is active. A new cart starts with a free-shipping tier, three trust badges and a shipping-protection add-on; a list of new tiers, badges or order_upsells in changes replaces those starters. When copying a cart from a screenshot or another store, ask the merchant first whether to copy its colors or keep the store's own colors, then render_cart_preview the result and patch what differs.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName in the app. Shoppers don't see it. Unique in the store.
changesNoFields to change, named as get_cart returns them. Sections merge into what is there; a section the cart lacks starts from its defaults, so send enabled: true to show it. Write shopper text in the cart's language (get_cart shows it).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / changes / properties / products_upsell / description
      Previous value: -"Products to add from the cart: auto_recommend (Shopify's related or complementary picks) or manual (rules that pick products). Fields: enabled, upsell_type, auto_recommendation_intent, auto_recommendation_limit, hide_added_products, layout, title, subtitle, button_text, title_color, subtitle_color, button_bg_color, button_text_color, product_title_color, product_subtitle_color, price_color, compare_at_price_color, card_border_color, card_bg_color, bg_color, image_size, text_size. get_cart with include_style shows their values."New value: +"Products to add from the cart: auto_recommend (Shopify's related or complementary picks) or manual (rules that pick products; fallback_to_auto_recommend: true shows AI recommendations when no rule matches). Fields: enabled, upsell_type, fallback_to_auto_recommend, auto_recommendation_intent, auto_recommendation_limit, hide_added_products, layout, title, subtitle, button_text, title_color, subtitle_color, button_bg_color, button_text_color, product_title_color, product_subtitle_color, price_color, compare_at_price_color, card_border_color, card_bg_color, bg_color, image_size, text_size. get_cart with include_style shows their values."
    • addedInput schema / properties / changes / properties / products_upsell / properties / fallback_to_auto_recommend
      Added value: +{
      +  "description": "In manual mode, show Shopify auto recommendations when no rule matches.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses that a Plus store's first cart goes live immediately while every other new cart is off until set_cart_status replaces the live cart. It also describes default starter content (a free-shipping tier, three trust badges, and a shipping-protection add-on), replacement rules for new lists, and the need to report rewards.tell_merchant. This gives the agent substantial operational context for a destructive, non-idempotent creation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but front-loaded around creation, live status, and the main workflow caveats. Most sentences carry operational detail that an agent needs for this complex tool. It is dense rather than bloated, though slightly more compact phrasing could improve scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, nested schema, and absent output schema, the description covers the important behavioral and workflow context: defaults, live-cart replacement, reward reporting, product id lookup, and screenshot-copy previewing. The annotations already cover the destructive and non-idempotent safety profile, so the remaining description content is sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful semantics not obvious from the schema: a new cart starts with default tiers, badges, and an order upsell, and a list of new tiers, badges or order_upsells in changes replaces those starters. It also clarifies that changes should be written in the cart's language and that product/variant ids need lookup first. That is useful extra meaning beyond the structured field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it creates a cart drawer initialized like the app's editor, in the store's colors and language, then applies changes. It distinguishes creation from later updates by explaining that a non-Plus new cart stays off until set_cart_status switches it on. An agent can identify this as the creation tool without needing sibling schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit workflow guidance: look up product and variant ids with search_products first, use set_cart_status to activate a cart, and when copying from a screenshot or another store, ask the merchant about colors, render_cart_preview, and patch differences. It also specifies how to relay reward-tier results to the merchant. These are concrete when-to-use and alternative-tool instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources