Skip to main content
Glama

Bafan

Create cart

create_cart
Destructive

Replace the cart contents with the confirmed items. Without a guest cart key it creates a separate guest cart. Signed-in users have one account cart. Returns the items, subtotal and, for guests, a private cart key.

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
itemsNo
cart_keyNoGuest carts only; omit it when the account is connected. Private tool input. Copy the key from an earlier tool result, the cart_key query parameter of a payment link, or the last segment of a /shop/mcp-checkout/ link already in the chat. Keep it out of shopper replies.
quantityNo
variant_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The description adds real context beyond the annotations: it discloses that existing contents are replaced (consistent with destructiveHint=true), explains guest-vs-account cart behavior, and states the return payload including the private guest cart key. No contradiction with the declared annotations.

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?

Three short sentences, front-loaded with the mutation semantics and followed by cart-scoping and return behavior. No wasted words, though the return-value sentence could be tighter.

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

Completeness4/5

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

For a destructive 4-parameter tool with no output schema, the description covers replacement semantics, authentication model, and return values. The main gap is the unexplained top-level variant_id/quantity pair, which sits in tension with the array-based items parameter.

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

Parameters3/5

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

Schema description coverage is only 25%, so the description must carry the burden. It covers the items array and the guest-only role of cart_key well, but the top-level variant_id and quantity parameters are left unexplained, leaving an agent unsure whether this is a bulk replace or a single-item add.

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

Purpose4/5

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

The description opens with a specific verb+resource ("Replace the cart contents with the confirmed items"), which is more accurate than the tool name implies and clarifies real behavior. It distinguishes guest carts from the single account cart, though it never names sibling tools like get_cart or set_cart_quantity to help an agent choose.

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

Usage Guidelines3/5

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

It gives useful context: omitting cart_key targets a guest cart, signed-in users have exactly one account cart. That implies when this tool is appropriate versus a read or quantity-update path, but no explicit when-to-use/when-not-to-use statement or named alternative is provided.

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