Skip to main content
Glama

Add custom print to cart

add_custom_to_cart

Add a finished custom print to the cart as a chosen garment and size and return the updated cart; use it only after the print is ready and product and size are selected.

Instructions

Put a finished custom print (from generate_custom_print) into the cart as a garment and return the updated cart. Call it once get_studio_status reports done and the human has chosen product and size; for catalog designs use add_to_cart instead. product is the garment the human picked in get_studio_options (default mens_oversize_tshirt); size must exist for it — an error lists the sizes. Adding the same print on the same product and size again grows that line (max 99). An unfinished print returns 'print is not ready' and nothing is added. Then checkout goes as usual: set_shipping_address → get_order_preview → prepare_order.

Input Schema

NameRequiredDescriptionDefault
qtyNoQuantity (default 1, max 99).
sizeYesSize label; must be available for the chosen product.
productNoStudio garment base, as chosen in get_studio_options (default mens_oversize_tshirt).
print_idYesFinished print id — get_studio_status must report status=done.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent instead of a cart when the call failed (bad index, unavailable size, ...).
itemsNoCart lines in index order — this index is what update_cart_item takes.
currencyNo
subtotalNoSum of price x qty over all lines, USD.
checkout_urlNoCart page URL for the human.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / product / description
      Previous value: -"Studio product base, same set as generate_custom_print (default mens_oversize_tshirt)."New value: +"Studio garment base, as chosen in get_studio_options (default mens_oversize_tshirt)."
    • addedInput schema / properties / product / enum
      Added value: +[
      +  "kids_basic_tshirt_boy",
      +  "kids_basic_tshirt_girl",
      +  "kids_oversize_tshirt_boy",
      +  "kids_oversize_tshirt_girl",
      +  "mens_basic_tshirt",
      +  "mens_oversize_tshirt",
      +  "womens_basic_tshirt",
      +  "womens_oversize_tshirt"
      +]
  2. Changed3 schema fields changedv1.1.0
    • changedInput schema / properties / print_id / description
      Previous value: -"Finished print id — studio_status must report status=done."New value: +"Finished print id — get_studio_status must report status=done."
    • changedInput schema / properties / product / description
      Previous value: -"Studio product base, same set as studio_generate (default mens_oversize_tshirt)."New value: +"Studio product base, same set as generate_custom_print (default mens_oversize_tshirt)."
    • changedOutput schema / properties / items / description
      Previous value: -"Cart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take."New value: +"Cart lines in index order — this index is what update_cart_item takes."
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly=false, idempotent=false, destructive=false), and the description adds genuinely new behavior: re-adding the same print/product/size grows the existing line up to 99, an unfinished print yields 'print is not ready' and adds nothing, and the tool returns the updated cart. These are non-obvious semantics an agent could not infer from the annotations.

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

Conciseness5/5

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

The precondition and the sibling exclusion are front-loaded, and every subsequent sentence adds a distinct fact (default product, size error, duplicate-line behavior, readiness failure, downstream chain). Dense but zero filler.

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?

For a 4-parameter mutation tool with an output schema present, the description covers preconditions, failure modes, duplicate handling, and the follow-on workflow. Nothing an agent needs in order to call it correctly and interpret the result is missing.

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 real value: the product default and its origin in get_studio_options, and the fact that an invalid size produces an error listing valid sizes. Qty semantics are conveyed indirectly via the line-growth/99 cap rather than stated as a parameter, which keeps it short of a 5.

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 opens with a specific verb and resource ('Put a finished custom print ... into the cart as a garment') and immediately names the boundary against its closest sibling ('for catalog designs use add_to_cart instead'). An agent can distinguish this from add_to_cart and generate_custom_print without opening any schema.

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 states the exact precondition ('once get_studio_status reports done and the human has chosen product and size') and explicitly routes the alternative case to add_to_cart. It also names where the product value comes from (get_studio_options) and gives the downstream workflow chain (set_shipping_address → get_order_preview → prepare_order).

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