Free shipping on all US orders — no minimum
PrintGen for assistants

Connect an assistant to PrintGen

One MCP server lets an AI assistant design custom apparel for a signed-in buyer, show it on the product, quote the order and confirm it once it is paid. The buyer always pays on PrintGen’s checkout page, which Shopify hosts; an assistant can never place or pay for an order.

Endpoint

https://mcp.printgen.ai/
Transport
Streamable HTTP
Sign-in
OAuth 2.1 with PKCE. The buyer signs in to PrintGen and chooses what the assistant may do.
Tools
17 tools: 13 read, 4 create something in the buyer’s account.
Ships to
United States only
Input
Written descriptions only. The tools do not take uploaded photos or logos.

Authentication

OAuth 2.1 authorization code with PKCE (S256). Clients discover the authorization server from /.well-known/oauth-protected-resource and may register themselves through dynamic client registration. A call without a valid token is answered with 401 and a WWW-Authenticate header that points at that document.

Access tokens last one hour. Request offline_access for a refresh token; a refresh token lasts 30 days and is replaced on every use.

Permissions

The buyer signs in to PrintGen and chooses which of these the assistant gets. Each is shown to them in the words below. They can disconnect the assistant at any time from their account page.

  • catalog:read

    Browse products you can customize

    Needed by shop.list_products, shop.get_product

  • design:read

    View the designs you made

    Needed by design.get_generation, design.get, design.list, design.browse

  • design:write

    Create and change designs for you

    Needed by design.generate, design.edit

  • mockup:read

    View previews of your designs on products

    Needed by design.browse, mockup.get_generation, mockup.get, mockup.show

  • mockup:write

    Create previews of your designs on products

    Needed by mockup.generate

  • order:read

    View your orders and their delivery status

    Needed by shop.get_checkout, shop.list_orders, shop.get_order

  • checkout:write

    Prepare a checkout link for you to pay

    Needed by shop.create_checkout

A typical session

  1. 1.shop.list_products Find a product the buyer can customize, with its starting price.
  2. 2.shop.get_product Read its colors and sizes. Each size carries the variant_id a checkout needs.
  3. 3.design.generate Start a design from the buyer’s description, then poll design.get_generation until it is done.
  4. 4.design.get Show the finished design on the product.
  5. 5.design.edit Refine it in plain language. Each edit is a new design, polled and shown the same way.
  6. 6.shop.create_checkout Quote the order for the chosen sizes and quantities, and get the checkout link.
  7. 7.shop.get_checkout After the buyer pays, confirm the order.
  8. 8.shop.get_order Later, report production and delivery.

Generation is asynchronous: a generate or edit call returns a handle, and the matching get_generation tool long-polls it for up to 50 seconds per call. A finished design already comes with pictures of it on the product. mockup.generate makes more on request, such as close-ups of the print.

Each buyer has a small allowance of free designs, the same one the website gives them. A delivered design or edit uses one, a failed one uses none, and an order adds more. Previews are free.

Checkout and payment

An assistant prepares the order and the buyer pays for it. No tool takes a payment: shop.create_checkout returns a quote and a link to PrintGen’s checkout page, and an order exists only once the buyer has paid there.

1. Quote the order

Show the buyer the finished design and agree the sizes and quantities first. Then send one item per size. Each variant_id comes from shop.get_product, for the product the design was made on. Order the color the design was made for; to offer another, run design.edit with the new variant_group_uuid first, so the buyer sees the design on that color. A checkout takes up to 20 sizes and up to 50 of each.

Call
{
  "name": "shop.create_checkout",
  "arguments": {
    "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
    "items": [
      {
        "variant_id": "c2e4a6b8-d0f1-4a3c-8e5b-7f9d1b3a5c60",
        "quantity": 2
      },
      {
        "variant_id": "f1b3d5a7-c9e0-4b2d-9a4c-6e8f0a2c4b71",
        "quantity": 1
      }
    ],
    "shipping_address": {
      "first_name": "Sam",
      "last_name": "Rivera",
      "address1": "500 Congress Ave",
      "city": "Austin",
      "state": "TX",
      "zip": "78701"
    }
  }
}
Result
{
  "checkout_id": "gid://shopify/Cart/hWN5k2PqT8xLm4RvYc7Zb1Qd?key=6b1f0e9d2c7a4b3e8f5a1c2d3e4f5a6b",
  "checkout_url": "https://…/cart/c/hWN5k2PqT8xLm4RvYc7Zb1Qd?key=6b1f0e9d2c7a4b3e8f5a1c2d3e4f5a6b",
  "status": "awaiting_payment",
  "seller": "PrintGen (Algorithmic Labs, LLC)",
  "lines": [
    {
      "variant_id": "c2e4a6b8-d0f1-4a3c-8e5b-7f9d1b3a5c60",
      "size": "M",
      "color": "Black",
      "quantity": 2,
      "unit_price_cents": 4699
    },
    {
      "variant_id": "f1b3d5a7-c9e0-4b2d-9a4c-6e8f0a2c4b71",
      "size": "L",
      "color": "Black",
      "quantity": 1,
      "unit_price_cents": 4699
    }
  ],
  "subtotal_cents": 14097,
  "shipping_cents": 0,
  "tax": "added on the checkout page, from the shipping address",
  "currency": "USD",
  "ships_to": "United States only",
  "address_prefilled": true,
  "policies_url": "https://printgen.ai/shipping-and-returns"
}
  • unit_price_cents is what the buyer pays for one, design included. It can be higher than the price_cents in shop.get_product, which is the price before the design.
  • shipping_cents is a number when shipping is already known, 0 when it is free, and null when the checkout page works it out. Tell the buyer a null is worked out at checkout; do not show it as free.
  • Tax is never in the quote. The checkout page adds it from the shipping address.
  • shipping_address is optional and must be a US address. With it, the checkout opens prefilled and all that is left for the buyer is to choose a payment method and confirm. Without it, they enter it on the checkout page.

2. Hand over the link

Give the buyer checkout_url exactly as it was returned. They pay on PrintGen’s checkout page; never ask for card details in the conversation. Keep checkout_id. Every call to shop.create_checkout makes a new checkout, so reuse the link you have instead of making another. An unpaid checkout costs nothing and expires on its own.

3. Confirm the payment

shop.get_checkout reads one of three states. Tell the buyer they have an order only after paid.

Open and unpaid
{
  "status": "awaiting_payment",
  "checkout_url": "https://…/cart/c/hWN5k2PqT8xLm4RvYc7Zb1Qd?key=6b1f0e9d2c7a4b3e8f5a1c2d3e4f5a6b"
}
Paid, with the order
{
  "status": "paid",
  "order": {
    "order_id": "7d1a3c5e-9b2f-4d6a-8c0e-2f4b6d8a0c13",
    "status": "paid",
    "stage": "paid",
    "total": "152.60",
    "currency": "USD",
    "created_at": "2026-10-09T15:04:12.381204+00:00",
    "items": [
      {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
        "title": "Milo's 7th Birthday",
        "quantity": 2,
        "unit_price": "46.99",
        "estimated_ship_at": "2026-10-14T00:00:00+00:00",
        "estimated_delivery_at": "2026-10-19T00:00:00+00:00"
      },
      {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
        "title": "Milo's 7th Birthday",
        "quantity": 1,
        "unit_price": "46.99",
        "estimated_ship_at": "2026-10-14T00:00:00+00:00",
        "estimated_delivery_at": "2026-10-19T00:00:00+00:00"
      }
    ],
    "tracking_url": null,
    "carrier": null,
    "ship_to": "Austin, TX"
  }
}
No longer open, and no order
{
  "status": "not_found"
}

For about a minute after the buyer pays, a checkout can read not_found before it reads paid. Check again before saying anything went wrong or creating another checkout.

4. Follow the order

shop.get_order and shop.list_orders report where a paid order is. stage is the state to tell the buyer, such as in_production, shipped or delivered. tracking_url and carrier are filled once it ships, and ship_to holds the city and state only. The shop.get_order entry below has an order that has shipped.

Changes, cancellations and refunds are handled by PrintGen support at contact@printgen.ai.

When a checkout cannot be made

  • A variant_id is not a size of the design’s product: invalid_argument. Use the ids shop.get_product returns for that product.
  • A size cannot be produced right now: an error with no code that names the sizes. Offer another size or color.
  • The design is still being prepared for checkout: an error with no code that says how many seconds to wait. Call again after that.
  • The address is not a US address, or the checkout does not accept it: invalid_argument. Fix it, or leave it out and let the buyer enter it at checkout.

Tools

The server has 17 tools. A Read tool changes nothing. A Write tool creates something in the buyer’s own PrintGen account. No tool is a sensitive write: none charges the buyer, places an order, sends a message or deletes anything. Everything below is generated from the server’s own tool definitions.

ProductsDesignsPreviewsCheckout and ordersConnection

Products

  • shop.list_productsRead

    List the products a buyer can put a design on, with starting prices.

    Permission
    catalog:read
    Side effects
    None.
    Rate limit
    60/min per connection
    Fields, result and an example

    Fields

    • querystring

      Optional words to match against the product name, brand or category, e.g. "hoodie" or "kids tee".

    • limitintegerDefault 20

      How many products to return (1-50).

    Result

    • productsobject[]

      Each has product_uuid (pass it to design.generate), title, category, from_price_cents, currency, colors and url.

    • totalinteger

      How many products matched.

    Example

    Call
    {
      "name": "shop.list_products",
      "arguments": {
        "query": "hoodie"
      }
    }
  • shop.get_productRead

    Return one product's colors, sizes and prices.

    Permission
    catalog:read
    Side effects
    None.
    Rate limit
    60/min per connection
    Fields, result and an example

    Fields

    • product_uuidstringRequired

      A product_uuid from shop.list_products.

    Result

    • product_uuidstring
    • titlestring
    • urlstring

      The product page on printgen.ai.

    • colorsobject[]

      Each has name, hex, variant_group_uuid (pass it to design.generate to pin the garment color) and sizes, where every size carries the variant_id that shop.create_checkout takes and its price_cents before any design surcharge.

    • currencystring

    Example

    Call
    {
      "name": "shop.get_product",
      "arguments": {
        "product_uuid": "0b6f3c1e-8a52-4d0e-9c1f-2f7a5b9d4e10"
      }
    }
    Result
    {
      "product_uuid": "0b6f3c1e-8a52-4d0e-9c1f-2f7a5b9d4e10",
      "title": "Heavy Blend Hoodie",
      "url": "https://printgen.ai/product/vb-hd-g18500",
      "colors": [
        {
          "name": "Black",
          "hex": "#0b0b0b",
          "variant_group_uuid": "2a4c6e80-b1d3-4f57-9a6c-8e0b2d4f6a19",
          "sizes": [
            {
              "size": "M",
              "variant_id": "c2e4a6b8-d0f1-4a3c-8e5b-7f9d1b3a5c60",
              "price_cents": 4699
            },
            {
              "size": "L",
              "variant_id": "f1b3d5a7-c9e0-4b2d-9a4c-6e8f0a2c4b71",
              "price_cents": 4699
            }
          ]
        }
      ],
      "currency": "USD"
    }

Designs

  • design.generateWrite

    Create a custom design for one product from the buyer's idea.

    PrintGen draws what prompt describes for the chosen product and saves it to the buyer's account. A delivered design uses one of the buyer's free design credits. No money is charged and no order is placed. Poll design.get_generation with the returned handle, then call design.get once to show the result.

    Permission
    design:write
    Side effects
    Creates a private design in the buyer's account. A delivered design uses one of the buyer's free designs; one that fails uses none.
    Rate limit
    10/min per connection
    Fields, result and an example

    Fields

    • product_uuidstringRequired

      A product_uuid from shop.list_products.

    • promptstringRequired

      The buyer's idea in plain language: the subject, any exact text, the style, the colors, and where it goes (front, back).

    • variant_group_uuidstring

      Optional garment color, a variant_group_uuid from shop.get_product. Omit to let PrintGen choose a color that suits the design.

    • idempotency_keystring

      Send the same key when retrying this exact call. A completed request replays for 24 hours without running or billing again.

    Result

    • handlestring

      Pass to design.get_generation.

    • status"pending"
    • messagestring

      How to poll for the result.

    Example

    Call
    {
      "name": "design.generate",
      "arguments": {
        "product_uuid": "0b6f3c1e-8a52-4d0e-9c1f-2f7a5b9d4e10",
        "prompt": "A golden retriever in a party hat on the front, with HAPPY 7TH BIRTHDAY MILO in bold rounded letters underneath"
      }
    }
  • design.get_generationRead

    Report whether a design is ready, with its previews once it is.

    Permission
    design:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • handlestringRequired

      The handle returned by design.generate or design.edit.

    • wait_secintegerDefault 0

      0 answers at once. A positive value waits up to that many seconds, 50 at most, for the design to finish.

    Result

    • handlestring
    • status"pending" | "running" | "complete" | "failed"
    • doneboolean
    • design_idstring | null

      The design's id once it exists.

    • progressnumber | null

      0.0-1.0 when known.

    • stagestring
    • product_imagesobject[]

      The design on the product (placement, image_url), front first. Empty until the design is ready.

    • urlstring | null

      The design's page on printgen.ai. Share this link rather than building one.

    • errorstring

      Why it failed, in words for the buyer.

    • next_actionobject | null

      On completion, the read-only call that shows the finished design. Make it once before replying.

    Example

    Call
    {
      "name": "design.get_generation",
      "arguments": {
        "handle": "9f2c4b6a-1d3e-4a5f-8b7c-0e1d2c3b4a59",
        "wait_sec": 50
      }
    }
  • design.getRead

    Return one of the buyer's saved designs with its previews.

    Permission
    design:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • design_idstringRequired

      The design's id.

    Result

    • idstring
    • titlestring
    • urlstring

      The design's page on printgen.ai. Share this link rather than building one.

    • generation_status"pending" | "running" | "complete" | "failed"
    • generation_errorstring

      Why it failed, in words for the buyer.

    • promptstring

      What the buyer asked for.

    • product_uuidstring | null

      The product it was made for.

    • product_titlestring | null
    • variant_group_uuidstring | null

      Its garment color.

    • created_atstring
    • product_imagesobject[]

      The design on the product (placement, image_url), front first. Empty when no preview is available.

    Example

    Call
    {
      "name": "design.get",
      "arguments": {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38"
      }
    }
  • design.editWrite

    Change one of the buyer's designs with a plain-language instruction.

    The edit starts from the saved design, so "make the text smaller, add the date" keeps everything else in place. The result is a new design and the earlier one is kept. A delivered edit uses one free design credit. Poll design.get_generation with the returned handle, then call design.get once to show the result.

    Permission
    design:write
    Side effects
    Creates a new design in the buyer's account and keeps the one it started from. A delivered edit uses one of the buyer's free designs; one that fails uses none.
    Rate limit
    10/min per connection
    Fields, result and an example

    Fields

    • design_idstringRequired

      The id of one of the buyer's designs.

    • instructionstringRequired

      What to change, in plain language.

    • variant_group_uuidstring

      Optional new garment color, a variant_group_uuid from shop.get_product. Omit to keep the current color.

    • idempotency_keystring

      Send the same key when retrying this exact call. A completed request replays for 24 hours without running or billing again.

    Result

    • handlestring

      Pass to design.get_generation.

    • status"pending"
    • messagestring

      How to poll for the result.

    Example

    Call
    {
      "name": "design.edit",
      "arguments": {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
        "instruction": "Make the lettering smaller and add the date June 14 below it"
      }
    }
  • design.listRead

    List the buyer's saved designs, newest first.

    Permission
    design:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • pageintegerDefault 1

      1-indexed.

    • page_sizeintegerDefault 20

      1 to 100.

    • searchstring

      Optional text to look for in the design titles.

    Result

    • resultsobject[]

      Each: id, title, url, generation_status, generation_error, prompt, product_uuid, product_title, variant_group_uuid, created_at.

    • totalnumber
    • pagenumber
    • page_sizenumber

    Example

    Call
    {
      "name": "design.list",
      "arguments": {}
    }
  • design.browseRead

    Browse the buyer's saved designs and their completed product images and mockups.

    Empty arguments open the buyer's saved designs. An optional design_id opens one of them. Search and pagination apply to the list of designs; mockup_page pages the selected design's completed mockups. This read-only view never generates, edits or charges for anything. Selecting an item supplies it as conversation context.

    Permission
    design:read, mockup:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • design_idstring

      Opens this saved design instead of the list.

    • searchstring

      Text to look for in the design titles.

    • pageintegerDefault 1

      Page of the list of designs, starting at 1.

    • mockup_pageintegerDefault 1

      Page of the opened design's finished previews, starting at 1.

    Result

    • libraryobject

      A page of the buyer's designs: results, total, page and page_size. Each design has id, title, url, status and product_images.

    • selectionobject | null

      The opened design (design) and a page of its finished previews (mockups, each with id, view, image_url and url). Null when no design_id was given.

    • searchstring

      The search text that was applied.

    • account_idstring

      Identifies the buyer's account.

    Example

    Call
    {
      "name": "design.browse",
      "arguments": {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38"
      }
    }

Previews

  • mockup.generateWrite

    Make preview images (mockups) of a finished design on its product.

    Previews are free. An image that already exists is reused, not made again. Poll mockup.get_generation with the returned handle, then call mockup.show once with the finished ids.

    Permission
    mockup:write
    Side effects
    Creates preview images in the buyer's account. Free.
    Rate limit
    20/min per connection
    Fields, result and an example

    Fields

    • design_idstringRequired

      The id of one of the buyer's finished designs.

    • viewsstring[]One of "product", "closeup"

      What to make: "product" for photos of the product (front and back where it has both), "closeup" for close-ups of the print. Defaults to ["product"].

    • idempotency_keystring

      Send the same key when retrying this exact call. A completed request replays for 24 hours without running or billing again.

    Result

    • handlestring | null

      Pass to mockup.get_generation. null when every requested preview already existed; show those with mockup.show.

    • status"pending" | "complete"
    • mockup_idsstring[]

      The previews this call covers.

    • messagestring

      How to get the result.

    Example

    Call
    {
      "name": "mockup.generate",
      "arguments": {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
        "views": [
          "product",
          "closeup"
        ]
      }
    }
  • mockup.get_generationRead

    Report whether previews are ready.

    Permission
    mockup:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • handlestringRequired

      The handle returned by mockup.generate.

    • wait_secintegerDefault 0

      0 answers at once. A positive value waits up to that many seconds, 50 at most, for the previews to finish.

    Result

    • handlestring
    • status"running" | "complete" | "failed"
    • doneboolean
    • progressnumber | null

      0.0-1.0 when known.

    • mockupsobject[]

      Each: id, status, image_url (null until ready) and error.

    • urlstring | null

      The page on printgen.ai that shows these previews. Share this link rather than building one.

    Example

    Call
    {
      "name": "mockup.get_generation",
      "arguments": {
        "handle": "5a7e9c1b-3d2f-4e6a-9b8c-7d6e5f4a3b21",
        "wait_sec": 50
      }
    }
  • mockup.getRead

    Return one of the buyer's saved previews.

    Permission
    mockup:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • mockup_idstringRequired

      A preview id from mockup.generate or mockup.get_generation.

    Result

    • idstring
    • viewstring

      Which view of the product it shows.

    • imagestring | null

      The image, once it is ready.

    • statusstring
    • created_atstring
    • urlstring

      The page on printgen.ai that shows the design's previews.

    Example

    Call
    {
      "name": "mockup.get",
      "arguments": {
        "mockup_id": "3d9e5f70-b1a4-4c62-8e17-6a0c2b4d8f91"
      }
    }
  • mockup.showRead

    Display finished previews together as one image gallery.

    Permission
    mockup:read
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • mockup_idsstring[]Required

      1 to 20 ids of finished previews, in the order to show them.

    Result

    • resultsobject[]

      Each: id, view, image, status, created_at and url.

    • totalnumber

    Example

    Call
    {
      "name": "mockup.show",
      "arguments": {
        "mockup_ids": [
          "3d9e5f70-b1a4-4c62-8e17-6a0c2b4d8f91",
          "a85c1e23-7f09-4b6d-9d3a-1c4e6f8b0a52"
        ]
      }
    }

Checkout and orders

  • shop.create_checkoutWrite

    Quote an order for one of the buyer's designs and prepare its hosted checkout.

    Nothing is charged and no order exists until the buyer opens checkout_url and pays there. Creates a checkout each time it is called; use shop.get_checkout to see whether an earlier one was paid before creating another.

    Permission
    checkout:write
    Side effects
    Creates a checkout that is open and unpaid. Charges nothing and places no order.
    Rate limit
    10/min per connection
    Fields, result and an example

    Fields

    • design_idstringRequired

      A finished design the buyer made (design.get_generation returns it as design_id).

    • itemsobject[]Required

      One entry per size, each {"variant_id": ..., "quantity": ...} with a variant_id from shop.get_product for the same product the design was made on.

    • shipping_addressobject

      Optional US address that prefills the checkout, so the buyer only has to confirm payment: first_name, last_name, address1, city, state (two letters), zip and optionally address2 and phone.

    Result

    • checkout_idstring

      Pass to shop.get_checkout.

    • checkout_urlstring

      The hosted checkout the buyer opens to pay.

    • status"awaiting_payment"
    • sellerstring
    • linesobject[]

      Each has variant_id, size, color, quantity and unit_price_cents as charged, design included.

    • subtotal_centsinteger
    • shipping_centsinteger | null

      Null when the checkout works it out.

    • taxstring

      Tax is added on the checkout page, from the address.

    • currencystring
    • ships_tostring
    • address_prefilledboolean
    • policies_urlstring

      Shipping, returns and refunds.

    Example

    Call
    {
      "name": "shop.create_checkout",
      "arguments": {
        "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
        "items": [
          {
            "variant_id": "c2e4a6b8-d0f1-4a3c-8e5b-7f9d1b3a5c60",
            "quantity": 2
          },
          {
            "variant_id": "f1b3d5a7-c9e0-4b2d-9a4c-6e8f0a2c4b71",
            "quantity": 1
          }
        ],
        "shipping_address": {
          "first_name": "Sam",
          "last_name": "Rivera",
          "address1": "500 Congress Ave",
          "city": "Austin",
          "state": "TX",
          "zip": "78701"
        }
      }
    }
    Result
    {
      "checkout_id": "gid://shopify/Cart/hWN5k2PqT8xLm4RvYc7Zb1Qd?key=6b1f0e9d2c7a4b3e8f5a1c2d3e4f5a6b",
      "checkout_url": "https://…/cart/c/hWN5k2PqT8xLm4RvYc7Zb1Qd?key=6b1f0e9d2c7a4b3e8f5a1c2d3e4f5a6b",
      "status": "awaiting_payment",
      "seller": "PrintGen (Algorithmic Labs, LLC)",
      "lines": [
        {
          "variant_id": "c2e4a6b8-d0f1-4a3c-8e5b-7f9d1b3a5c60",
          "size": "M",
          "color": "Black",
          "quantity": 2,
          "unit_price_cents": 4699
        },
        {
          "variant_id": "f1b3d5a7-c9e0-4b2d-9a4c-6e8f0a2c4b71",
          "size": "L",
          "color": "Black",
          "quantity": 1,
          "unit_price_cents": 4699
        }
      ],
      "subtotal_cents": 14097,
      "shipping_cents": 0,
      "tax": "added on the checkout page, from the shipping address",
      "currency": "USD",
      "ships_to": "United States only",
      "address_prefilled": true,
      "policies_url": "https://printgen.ai/shipping-and-returns"
    }
  • shop.get_checkoutRead

    Report whether a checkout from shop.create_checkout has been paid.

    Permission
    order:read
    Side effects
    None.
    Rate limit
    60/min per connection
    Fields, result and an example

    Fields

    • checkout_idstringRequired

      The checkout_id shop.create_checkout returned.

    Result

    • statusstring

      paid once the order is recorded; awaiting_payment while the checkout is open and unpaid; not_found when it is no longer open and no order is recorded, which is also what a payment made in the last minute looks like.

    • orderobject

      Present when paid; the same fields as shop.get_order.

    • checkout_urlstring

      Present when awaiting_payment.

    Example

    Call
    {
      "name": "shop.get_checkout",
      "arguments": {
        "checkout_id": "gid://shopify/Cart/hWN5k2PqT8xLm4RvYc7Zb1Qd?key=6b1f0e9d2c7a4b3e8f5a1c2d3e4f5a6b"
      }
    }
    Result
    {
      "status": "paid",
      "order": {
        "order_id": "7d1a3c5e-9b2f-4d6a-8c0e-2f4b6d8a0c13",
        "status": "paid",
        "stage": "paid",
        "total": "152.60",
        "currency": "USD",
        "created_at": "2026-10-09T15:04:12.381204+00:00",
        "items": [
          {
            "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
            "title": "Milo's 7th Birthday",
            "quantity": 2,
            "unit_price": "46.99",
            "estimated_ship_at": "2026-10-14T00:00:00+00:00",
            "estimated_delivery_at": "2026-10-19T00:00:00+00:00"
          },
          {
            "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
            "title": "Milo's 7th Birthday",
            "quantity": 1,
            "unit_price": "46.99",
            "estimated_ship_at": "2026-10-14T00:00:00+00:00",
            "estimated_delivery_at": "2026-10-19T00:00:00+00:00"
          }
        ],
        "tracking_url": null,
        "carrier": null,
        "ship_to": "Austin, TX"
      }
    }
  • shop.list_ordersRead

    List the buyer's paid orders, newest first.

    Permission
    order:read
    Side effects
    None.
    Rate limit
    60/min per connection
    Fields, result and an example

    Fields

    • limitintegerDefault 10

      How many orders to return (1-50).

    Result

    • ordersobject[]

      Each has order_id, status, stage (the buyer-facing production or delivery state), total, currency, created_at, items and, once shipped, tracking_url.

    Example

    Call
    {
      "name": "shop.list_orders",
      "arguments": {}
    }
  • shop.get_orderRead

    Return one of the buyer's orders with its production and delivery state.

    Permission
    order:read
    Side effects
    None.
    Rate limit
    60/min per connection
    Fields, result and an example

    Fields

    • order_idstringRequired

      An order_id from shop.list_orders.

    Result

    • order_idstring
    • statusstring
    • stagestring

      Buyer-facing production or delivery state.

    • totalstring
    • currencystring
    • created_atstring
    • itemsobject[]

      Each has design_id, title, quantity, unit_price and estimated ship and delivery dates when known.

    • tracking_urlstring | null
    • carrierstring | null
    • ship_tostring

      City and region only.

    Example

    Call
    {
      "name": "shop.get_order",
      "arguments": {
        "order_id": "7d1a3c5e-9b2f-4d6a-8c0e-2f4b6d8a0c13"
      }
    }
    Result
    {
      "order_id": "7d1a3c5e-9b2f-4d6a-8c0e-2f4b6d8a0c13",
      "status": "shipped",
      "stage": "shipped",
      "total": "152.60",
      "currency": "USD",
      "created_at": "2026-10-09T15:04:12.381204+00:00",
      "items": [
        {
          "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
          "title": "Milo's 7th Birthday",
          "quantity": 2,
          "unit_price": "46.99",
          "estimated_ship_at": "2026-10-14T00:00:00+00:00",
          "estimated_delivery_at": "2026-10-19T00:00:00+00:00"
        },
        {
          "design_id": "e4a1c7b2-3f58-4c9d-a6e0-9b2d7f1c5a38",
          "title": "Milo's 7th Birthday",
          "quantity": 1,
          "unit_price": "46.99",
          "estimated_ship_at": "2026-10-14T00:00:00+00:00",
          "estimated_delivery_at": "2026-10-19T00:00:00+00:00"
        }
      ],
      "tracking_url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111899223197428490",
      "carrier": "USPS",
      "ship_to": "Austin, TX"
    }

Connection

  • pingRead

    Return the provided string back to the caller.

    Permission
    None
    Side effects
    None.
    Rate limit
    None
    Fields, result and an example

    Fields

    • echostringDefault "pong"

      Any string the caller wants echoed.

    Result

    • echostring

      The string you passed in.

    Example

    Call
    {
      "name": "ping",
      "arguments": {}
    }

Errors

A failed call returns an error whose message starts with a stable code, then a colon and a sentence the assistant can show the buyer. A failure with no code says in its message what happened; most are temporary, so wait and try again.

  • invalid_argument
    An input failed validation. The message names the field. Fix it and call again.
  • not_found
    The design, product, preview or order does not exist or is not this buyer’s.
  • missing_scope
    The buyer did not grant the permission this tool needs.
  • rate_limited
    Too many calls to this tool. The message says how long to wait.
  • insufficient_credits
    The buyer has used their free designs. An order adds more. Nothing was made.

Support

Questions about connecting an assistant: contact@printgen.ai.