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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cartIdYes
quoteIdYes
lineItemYes
attemptIdYes
approvalIdYes
checkoutUrlYesShopify checkout URL; the buyer confirms shipping, tax and total there.
instructionsYes
designAssetIdYes
quotedSubtotalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "approvalId": {
      +      "type": "string"
      +    },
      +    "attemptId": {
      +      "type": "string"
      +    },
      +    "cartId": {
      +      "type": "string"
      +    },
      +    "checkoutUrl": {
      +      "description": "Shopify checkout URL; the buyer confirms shipping, tax and total there.",
      +      "type": "string"
      +    },
      +    "designAssetId": {
      +      "type": "string"
      +    },
      +    "instructions": {
      +      "type": "string"
      +    },
      +    "lineItem": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "currency": {
      +          "type": "string"
      +        },
      +        "packPrice": {
      +          "type": "string"
      +        },
      +        "productTitle": {
      +          "type": "string"
      +        },
      +        "selectedOptions": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "name": {
      +                "description": "Option name exactly as listed, e.g. \"Corners\".",
      +                "type": "string"
      +              },
      +              "value": {
      +                "description": "Chosen value exactly as listed, e.g. \"Square\".",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "name",
      +              "value"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "variantTitle": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "productTitle",
      +        "variantTitle",
      +        "packPrice",
      +        "currency",
      +        "selectedOptions"
      +      ],
      +      "type": "object"
      +    },
      +    "quoteId": {
      +      "type": "string"
      +    },
      +    "quotedSubtotal": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "amount": {
      +          "description": "Decimal amount as a string, e.g. \"24.99\".",
      +          "type": "string"
      +        },
      +        "currency": {
      +          "description": "ISO 4217 currency code, e.g. USD.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "amount",
      +        "currency"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "attemptId",
      +    "approvalId",
      +    "quoteId",
      +    "quotedSubtotal",
      +    "checkoutUrl",
      +    "cartId",
      +    "designAssetId",
      +    "lineItem",
      +    "instructions"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only indicate a mutating, non-idempotent operation; the description explains exactly what that means: one approval creates one purchase attempt, unknown cart outcomes stay on hold, Shopify verifies the subtotal before returning a payment link, and the full set of failure codes is disclosed. There is no contradiction with 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 description is dense but intentionally structured: core transformation first, then preconditions, retry policy, changed-price handling, return values, and error codes. Every sentence carries a distinct operational rule; there is no filler or repetition of structural schema details.

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 high-stakes, non-idempotent, multi-token flow with seven parameters and nested objects, the description covers sequencing, prerequisites, retry constraints, price-change behavior, output shape, and error handling. An agent has everything needed to know when and how to invoke it without inferring side effects from sibling tools.

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%, so the schema already documents every parameter. The top-level description still adds operational value by connecting approvalId, quoteToken, and designToken as a single confirmed purchase path, requiring selectedOptions to match get_product exactly, and conditioning confirmUpdatedQuote on explicit customer confirmation of changed terms.

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 first sentence states a precise verb, resource, inputs, and output: it turns a design token, pack options, and email into a Shopify checkout URL with print-ready artwork attached to the line item. It also names the prerequisite sibling flow (create_business_card_design, approve_design_proof, get_quote), making it clearly distinct from the other design/approval/quote tools.

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?

The description explicitly says 'Call this only after the buyer has approved both design previews and chosen a value for every customer-facing option,' and then lists required tokens. It gives concrete retry rules, tells the agent when to request a fresh quote, and explicitly says 'Uncertain outcomes require recovery, never a replacement purchase.' This is unusually complete for when-to-use and when-not-to-use guidance.

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