Skip to main content
Glama

Create a checkout for a business card design

create_checkout

Turns a design token from create_business_card_design plus the buyer's chosen pack options and email into a Shopify checkout URL, with the print-ready artwork attached to the line item. Call this only after the buyer has approved both design previews and chosen a value for every customer-facing option get_product lists for the business card product (for example Corners and Quantity). selectedOptions must include every option get_product lists, keyed by option name with the buyer's chosen value exactly as listed there. Requires approvalId from approve_design_proof for the same artwork and configuration, plus a quoteToken from get_quote confirmed by the buyer. One approval creates one purchase attempt; retries must keep the same approval, buyer and purchase terms. Uncertain outcomes require recovery, never a replacement purchase. Expired, altered or changed quote terms stop checkout; request a fresh quote and renewed confirmation. For a changed price on an existing purchase, keep the same buyer/artwork/options and set confirmUpdatedQuote:true only after explicit customer confirmation of the fresh quote. This reuses the original purchase/cart; unknown cart outcomes stay on hold. Shopify verifies the resulting cart subtotal before any payment link is returned, then confirms final shipping, tax, discounts and payable total in checkout. Returns quoteId, quotedSubtotal, checkoutUrl, cartId, designAssetId, and lineItem { productTitle, variantTitle, packPrice, currency, selectedOptions }. Fails with quote_required, quote_invalid, quote_expired, quote_changed, quote_unavailable, access_denied, design_token_invalid, design_token_expired, design_not_found, unknown_template, product_unavailable, variant_unavailable {selectedOptions, availableOptions}, rate_limited {retryAfterSeconds}, storage_failed, cart_create_failed, or connector_unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buyerYesThe buyer completing checkout.
approvalIdYesThe approvalId from approve_design_proof for this exact artwork and print configuration; artwork approval is separate from payment consent.
guestTokenNoPrivate guestToken from start_guest_session, required only for anonymous guest design and checkout. Omit when connected through InkFE customer sign-in (OAuth) or a provisioned integration key; those connections must not start a guest session. Keep guest tokens in this conversation; never put them in a URL or share them.
quoteTokenYesThe unexpired quoteToken from get_quote whose product terms the buyer confirmed. Expired or changed terms require a new quote and confirmation. Keep this token in the conversation; never put it in a URL.
designTokenYesThe designToken returned by create_business_card_design for the design the buyer approved.
selectedOptionsYesEvery customer-facing option get_product lists for the business card product, keyed by option `name` (for example "Corners") with the buyer's chosen `value` (for example "Square") exactly as listed. Fails with variant_unavailable when no purchasable variant matches.
confirmUpdatedQuoteNoOnly set true after showing changed commercial terms from a fresh get_quote and receiving the customer's explicit confirmation. Reuses the existing purchase, buyer and approved artwork; never creates a replacement for an unknown cart outcome. Omit for ordinary retries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are all false/negative (readOnlyHint=false, idempotentHint=false, destructiveHint=false), so the description carries the burden of behavioral disclosure and meets it thoroughly. It discloses the side effect of creating a purchase attempt ('One approval creates one purchase attempt'), the non-idempotent retry semantics, that unknown cart outcomes 'stay on hold', and that Shopify verifies the subtotal before returning a payment link. It also enumerates the full failure surface. No contradiction with 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?

Purpose is front-loaded in the first sentence, and every sentence earns its place: prerequisites, retry semantics, quote-change handling, and failure modes. The main flaw is structural — it is one dense, unbroken paragraph with a very long error-code list appended, making it harder for an agent to scan quickly despite the high information density.

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 tool with 7 parameters, nested objects, no output schema, and sequencing dependencies on four siblings, this description is remarkably complete. It covers prerequisites, ordering, retry/quote-change behavior, the explicit return fields (quoteId, quotedSubtotal, checkoutUrl, cartId, designAssetId, lineItem) since no output schema exists, and the complete error code surface.

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 description coverage is 100% with detailed per-parameter descriptions (e.g., buyer.email 'does not prove ownership', selectedOptions keyed by option name). The description adds genuine value by linking parameters to the workflow — which prior call each token originates from (approvalId from approve_design_proof, quoteToken from get_quote, designToken from create_business_card_design) and the confirmUpdatedQuote retry semantics — context the schema alone doesn't provide.

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 opening sentence names a specific verb-resource pair ('turns a design token from create_business_card_design plus the buyer's chosen pack options and email into a Shopify checkout URL') and states the concrete output (checkout URL with print-ready artwork attached to the line item). It clearly distinguishes itself from siblings like approve_design_proof and get_quote by positioning itself as the terminal purchase step.

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?

Explicitly states when to call: 'Call this only after the buyer has approved both design previews and chosen a value for every customer-facing option get_product lists.' It enumerates required prerequisites (approvalId from approve_design_proof, quoteToken from get_quote), and gives precise when-not-to-use guidance (retries keep same approval; uncertain outcomes require recovery, never replacement; expired/changed quotes require fresh quote and renewed confirmation).

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