AI Tools
Every Shopify action Lyna's AI can run from chat, and how each one is gated.
When a store is connected, Lyna's AI agent manages it for you from chat by calling Shopify tools. You describe what you want ("create three candle products", "publish everything to the Online Store", "set up a 10% welcome code") and Lyna runs the matching tools against your store.
Lyna works across two surfaces:
- Storefront (client side): the public read and cart API your shoppers' browser talks to, using the public storefront access token that is safe to embed. Available at both connection levels.
- Admin (server side, full access only): catalog management (products, collections, discounts, orders). Every Admin call is proxied through Lyna's server, which authenticates with short-lived Admin API tokens obtained from your app's Client ID and Client secret and owns the permission gate. Your credentials never reach the browser.
Connection levels
Which tools exist depends on how the project is connected:
- Storefront connect: storefront tools only. Lyna can read the catalog through the Storefront API, scaffold and wire the storefront, and create carts for Shopify hosted checkout. Product management stays in the Shopify admin.
- Full access: everything above, plus the Admin tools: products, variants, collections, discounts, inventory, orders, webhooks, and raw Admin GraphQL and REST access.
A project on Storefront connect can upgrade at any time from Settings > Integrations > Shopify > Upgrade to full access.
The workflow
- Lyna checks the connection status first.
- If no store is connected, Lyna shows a setup card so you can connect your store, then waits for you.
- Once connected, Lyna runs read tools freely and asks for approval on write tools, based on your permissions. Tools above the project's connection level are not available until you upgrade.
Read tools need no approval. Write tools are approval-gated: with the default "Ask each time" level, Lyna explains what it is about to do and waits for your confirmation. A tool set to "Never" returns a permission-denied result, and Lyna will not retry it.
Tools reference
The tables below list every Shopify tool, grouped by area, with its read or write classification. Write tools appear in the per-tool permission matrix and are approval-gated; read tools are available to any editor and are not individually gated. Each group also notes the connection level it needs: tools marked for Storefront connect work at either level, tools marked for full access only exist on a full access connection.
Connection and setup
Available at any connection level.
| Tool | Type | What it does |
|---|---|---|
| Check status | Read | Check whether a store is connected to the project. |
| Propose setup | Read | Show the connect setup card when no store is connected. |
| Get store create URL | Read | Open Shopify's store-creation page for a new store. |
| Get storefront credentials | Read | Return the public storefront access token and shop domain for your app. |
| Disconnect store | Write | Disconnect the store from the project (owner only). |
Products and variants
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List products | Read | List products in the store. |
| Get product | Read | Fetch a single product with its variants and images. |
| Create product | Write | Add a product with variants, images, and pricing. |
| Update product | Write | Edit a product's title, description, tags, status, or media. |
| Delete product | Write | Permanently remove a product. |
| Add product image | Write | Add an image from a URL, an upload, or an AI-generated image. |
| Add product variant | Write | Add a variant such as a size or color. |
| Update product variant | Write | Edit a variant's price, SKU, inventory, or options. |
| Delete product variant | Write | Remove a variant from a product. |
Collections
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List collections | Read | List collections in the store. |
| Create collection | Write | Group products into a new collection. |
| Update collection | Write | Edit a collection's title, description, or membership. |
| Delete collection | Write | Remove a collection. |
Discounts and pricing
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List discount codes | Read | List code-based discounts. |
| List price rules | Read | List price rules. |
| Create discount code | Write | Create a code with a percentage or fixed amount, dates, and limits. |
| Update discount code | Write | Edit a discount code's value, schedule, or limits. |
| Delete discount code | Write | Remove a discount code. |
| Create price rule | Write | Create a price rule that defines how a discount applies. |
| Update price rule | Write | Edit a price rule's conditions or value. |
| Delete price rule | Write | Remove a price rule. |
| Create automatic discount | Write | Create a discount that applies automatically at checkout. |
| List automatic discounts | Read | List discounts that apply automatically at checkout. |
| Update automatic discount | Write | Edit an automatic discount's value or schedule. |
| Delete automatic discount | Write | Remove an automatic discount. |
| Create buy X get Y discount | Write | Create a "buy X get Y" promotion, automatic or code-based. |
| Create free shipping discount | Write | Create a free-shipping discount, automatic or code-based. |
| Create gift card | Write | Issue a gift card. The code is shown once, so relay it immediately. |
| List gift cards | Read | List issued gift cards with masked codes. |
Catalog automation
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| Create smart collection | Write | Create a rule-based collection that auto-includes matching products. |
| Duplicate product | Write | Copy an existing product as a starting point. |
| Bulk update prices | Write | Update prices for up to 250 variants in one call. |
| Set SEO | Write | Set the SEO title, description, and handle for a product or collection. |
| Add product media | Write | Attach an image, video, 3D model, or external video to a product. |
| Generate product images | Write | Generate images with AI and attach them to a product in one step. |
| Create product bundle | Write | Create a fixed bundle from several products. |
Inventory and content
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List locations | Read | List the store's inventory locations. |
| Get shop | Read | Read store name, currency, and plan. |
| List metaobjects | Read | List entries of a custom content type. |
| Set inventory | Write | Set available inventory for a variant at a location (absolute quantity). |
| Adjust inventory | Write | Change inventory by a delta (positive or negative) across locations. |
| Set metafield | Write | Create or update a metafield on a product, collection, or other resource. |
| Create metaobject definition | Write | Define a custom content type for structured content. |
| Create metaobject | Write | Add an entry of a custom content type. |
| Upload file | Write | Upload an image or file to the store's content library. |
| Create page | Write | Create an Online Store page. |
| Update page | Write | Edit an Online Store page. |
| List pages | Read | List Online Store pages. |
| Create blog article | Write | Publish a blog article (the blog is created if needed). |
| List blog articles | Read | List blog articles. |
| Set menu | Write | Create or update a navigation menu by handle. |
| List menus | Read | List navigation menus. |
Orders and customers
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List orders | Read | List recent orders. |
| Get order | Read | Read a single order. |
| List fulfillments | Read | List an order's shipments and tracking. |
| List customers | Read | List customers. |
| Get customer | Read | Read a single customer. |
| Create draft order | Write | Draft an order for a customer before it is finalized. |
| Complete draft order | Write | Turn a draft order into a real order. |
| Refund order | Write | Refund an order. Lyna derives safe amounts from Shopify's suggested refund. |
| Cancel order | Write | Cancel an order with a reason. |
| List fulfillment orders | Read | List an order's fulfillment orders and any holds. |
| Create fulfillment | Write | Fulfill an order, optionally with tracking. |
| Update tracking | Write | Update the tracking info on a fulfillment. |
| Set fulfillment hold | Write | Place or release a hold on a fulfillment order. |
| List abandoned checkouts | Read | List abandoned checkouts for recovery. |
| Create customer | Write | Create a customer record. |
| Update customer | Write | Edit a customer. Tags replace the existing set, so read and merge first. |
| Set customer marketing consent | Write | Set a customer's email or SMS marketing consent. |
Reading customer and order data goes through your own app, and Shopify may require protected customer data approval on that app before those reads work on a production store. Development stores are exempt. If a read reports missing access, request the protected customer data permissions in your app's settings on Shopify, and make sure the related scopes are in the app version you released.
Sales channels
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List publications | Read | List the store's sales-channel publications. |
| Publish product | Write | Publish a product to a sales channel so it appears on your storefront. |
| Publish all products | Write | Publish every product to a sales channel in one step. |
Payments
| Tool | Type | What it does | Requires |
|---|---|---|---|
| Get payment settings | Read | Read the store's currency and supported wallet configuration. | Full access |
| Create checkout | Write | Mint a cart and return a hosted checkout URL to start a purchase. | Storefront connect |
Webhooks
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List webhooks | Read | List the webhook subscriptions registered for the store. |
| Create webhook | Write | Subscribe an endpoint to a webhook topic. |
| Delete webhook | Write | Remove a webhook subscription. |
Markets
Requires a full access connection.
| Tool | Type | What it does |
|---|---|---|
| List markets | Read | List the store's international selling regions and base currency. |
| Create market | Write | Add an international market (region and currency). |
| Update market | Write | Edit a market's regions or settings. |
| Delete market | Write | Remove a market. |
| List selling plan groups | Read | List subscription plans (display and purchase existing plans only). |
Storefront reads
These typed reads work on any connection, including a Storefront-only connect, so the AI can browse the catalog without Admin access.
| Tool | Type | What it does |
|---|---|---|
| Storefront products | Read | List products from the public Storefront API. |
| Storefront product | Read | Read one product by handle or id, with variants. |
| Storefront collections | Read | List collections from the public Storefront API. |
| Storefront search | Read | Search the catalog from the public Storefront API. |
| Storefront recommendations | Read | Get related or complementary product recommendations. |
Bulk operations
Requires a full access connection. One bulk operation runs per store at a time.
| Tool | Type | What it does |
|---|---|---|
| Run bulk query | Write | Export large datasets with a background bulk query. |
| Run bulk mutation | Write | Apply large batches of writes with a background bulk mutation. |
| Get bulk operation | Read | Check the status of the running or last bulk operation. |
| Cancel bulk operation | Write | Cancel the running bulk operation. |
Storefront and functions
| Tool | Type | What it does | Requires |
|---|---|---|---|
| Set storefront variables | Write | Write the Storefront API environment variables into your app. | Storefront connect |
| Scaffold storefront | Write | Add the Storefront client plus starter product and cart routes. | Storefront connect |
| Scaffold Shopify Function | Write | Generate a Shopify Function extension for discounts, validation, or checkout logic. | Full access |
| Enable shopping assistant | Write | Turn on the AI shopping assistant and wire it into the storefront (bills your wallet per shopper message). | Storefront connect |
| Disable shopping assistant | Write | Turn the assistant off and remove its keys. | Storefront connect |
The storefront scaffold is modular. Beyond the product and cart routes, you can ask Lyna to add optional modules (each is additive and never overwrites your files): a search page, customer accounts and orders, product reviews, international markets and currency, a wishlist, related-product recommendations, subscription (selling plan) options, and the shopping assistant widget. Structured-data SEO helpers are always included.
Raw API access
| Tool | Type | What it does | Requires |
|---|---|---|---|
| Admin GraphQL query | Read | Run any read query against the Admin GraphQL API. | Full access |
| Admin REST read | Read | Send a GET request to the Admin REST API. | Full access |
| Storefront GraphQL | Read | Run a query against the public Storefront API. | Storefront connect |
| Admin GraphQL mutation | Write | Run any write operation against the Admin GraphQL API. | Full access |
| Admin REST write | Write | Send POST, PUT, PATCH, or DELETE to the Admin REST API. | Full access |
Shopping assistant
The scaffolded storefront ships a floating shopping-assistant widget. Out of the box it does instant product search against the public Storefront API, at no cost and with no server. You can upgrade it to a conversational AI assistant that answers open questions like "what is a good gift under $50?" and returns matching products.
Turn it on from chat: ask Lyna to enable the shopping assistant (and approve the request). It is approval gated because each shopper message is billed to your Lyna wallet, up to a daily cap you choose. On approval Lyna mints a public assistant key, writes VITE_LYNA_ASSISTANT_URL and VITE_LYNA_ASSISTANT_KEY into your project's .env, and restarts the dev server, so the widget goes live with no manual step. Keep the project preview open so Lyna can write the env file. Ask Lyna to disable it to revoke the key and remove those variables; the widget then falls back to local search.
The assistant is storefront only: it can search the catalog, answer product and policy questions, add items to the cart, and hand off to Shopify hosted checkout. It never touches admin data or customer orders, and the key it uses is public (safe to ship in your site), not a secret. Each shopper message is billed to the store owner's Lyna account, up to the daily cap.
Example prompts
Storefront prompts (scaffolding, displaying products, cart, test checkout) work at either connection level. Catalog prompts (creating products, collections, discounts, inventory) need a full access connection.
- "Create three candle products with prices, descriptions, and images, then publish them to the Online Store."
- "Add Small, Medium, and Large variants to the t-shirt, each at $24.99."
- "Make a Summer Sale collection with the floral dresses."
- "Create a discount code SUMMER15 for 15% off, valid through August."
- "Set up an automatic 10% discount for orders over $100."
- "Set inventory for the blue mug to 40 at my main location."
- "Scaffold the storefront in my app with product listing and cart routes, then wire it to the connected store."
- "Display the products from my store on the home page in a grid."
- "Build a wishlist feature backed by the Storefront API."
- "Add the AI shopping assistant to my storefront with a $2 daily budget."
- "Create a test checkout so I can verify the purchase flow."
The storefront Lyna generates targets your project's stack (a React app with TypeScript). Cart and checkout use the Storefront cart mutations and redirect shoppers to Shopify's hosted checkout, so there is never a custom payment form holding card data.