Ask AI

v1.0.0
com.ask-ai-data-connector/ask-ai Checked 2 days ago Published 4 months ago

Ask questions across Shopify, Klaviyo, GA4 and 20+ e-commerce sources in plain English.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_revenue_drivers Explain a revenue change

Diagnostic tool for 'why did revenue change?' questions. Bundles headline metric deltas, product mix shifts, and pre-generated ranked hypotheses into one call — so you don't have to stitch signals together yourself and risk asserting causation. Each hypothesis includes: what signal supports it, what else would be true if it's correct, and which tool to call next to confirm or rule it out. Use when the merchant asks why revenue went up or down, what's driving performance, or what changed.

ParameterTypeDescription
comparisonstringComparison window. Default: previous (equivalent prior period).
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday.
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window.
storestringFilter to a specific store domain.

get_anomalies Find unusual metric moves

Anomaly detection across revenue, conversion rate, and refund rate for each of your stores (works for a single store too). Compares the most recent 7-day window against the prior 4 weeks and flags moves outside +/- 1.5 standard deviations or 25% — whichever is stricter. Returns ranked anomalies with store, metric, current vs baseline, severity, and a one-line explanation. High-severity anomalies carry EITHER `drivers`+`driverSummary` (the tag/source/country slice that drove the move) OR `driversNote` (attribution ran, the move is broad-based — sitewide cause, not one channel), plus an `inv…

ParameterTypeDescription
lookbackWeeksintegerHow many prior weeks to use as baseline (default 4).

get_sync_health Check data sync health

Report the health of every connected data source for each of your stores (works for a single store too). For each provider/instance: last successful sync timestamp, record count, freshness flag (stale if > 36h), and key-field nullability rates (e.g. % of customers without firstOrderAt populated). Use this to diagnose 'why is metric X showing 0?' or to confirm data is current before reporting numbers.

get_data_sources List connected data sources

CALL THIS FIRST to see which data sources are connected and have data. Returns connection status and record counts for: Shopify (always connected), Triple Whale, Klaviyo, Gorgias, Recharge, Google Search Console, Google Analytics, Microsoft Clarity, and YouTube. Use this to understand what data is available before making other queries. If a source shows 'not_connected', those tools will return empty results.

get_complete_dashboard Business overview across all sources

Get a unified dashboard with key metrics from ALL connected data sources in one call. Returns a lean snapshot of revenue, traffic, marketing, email, organic search, UX, support, reviews, subscriptions, and loyalty — only for sources that are connected. Use this for 'Give me an overview' or 'How is the business doing?' then drill into specifics with individual tools. Note: in multi-store mode, the store param filters Shopify data (revenue, orders, products, customers) to that store. Non-Shopify sources (GA4, Klaviyo, Search Console, Gorgias, etc.) are account-level and always return aggregate…

ParameterTypeDescription
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_metrics_comparison Compare metrics between periods

BEST FOR COMPARISONS AND THE CANONICAL CONVERSION RATE: Get core e-commerce metrics (Revenue, Sessions, CVR, AOV, Revenue per Session) with period-over-period comparisons. CVR here uses Shopify TrafficStat sessions (Plus/Advanced) — or GA4 sessions as fallback — divided by REAL Shopify orders. This is the right source for 'what's my conversion rate?' / 'how's my CVR trending?' questions. Do NOT use Triple Whale pixel CVR (from get_connector_data(connector:'triple-whale') or get_marketing_performance._pixelFunnel) as a stand-in: pixel undercounts purchases and sessions and produces misleadi…

ParameterTypeDescription
endDate *stringEnd date of current period (YYYY-MM-DD)
startDate *stringStart date of current period (YYYY-MM-DD)
compareEndDatestringFor custom comparison: end date of comparison period (YYYY-MM-DD)
compareLabelstringLabel for custom comparison period (e.g., 'Last Year Black Friday Sale')
compareStartDatestringFor custom comparison: start date of comparison period (YYYY-MM-DD)
comparisonstringComparison type: wow (week-over-week), mom (month-over-month), yoy (year-over-year), previous (equivalent previous period)

get_metrics_multi_compare Compare metrics across several periods

Get metrics with MULTIPLE comparisons at once. Perfect for questions like 'Show me revenue WoW and YoY' or 'Compare this week to last week and same week last year'. Returns { period, metrics, comparisons, charts, presentation }. `charts` is an array of grouped-bar specs (one per headline metric) with 3+ bars each (current + each comparison period). DEFAULT TO RENDERING THE RELEVANT CHART for multi-period questions — bars side-by-side communicate the deltas instantly. Pull each comparison's % change from its `changes` object for captions.

ParameterTypeDescription
endDate *stringEnd date of current period (YYYY-MM-DD)
startDate *stringStart date of current period (YYYY-MM-DD)
comparisonsarrayList of comparison types to include (default: ['wow', 'yoy'])
customComparisonsarrayCustom comparison periods (e.g., last year's sale period)

get_yoy_monthly Year-over-year by month

Month-by-month year-over-year comparison for a single metric. SINGLE-CALL ANSWER for 'how is revenue this year vs last year by month?' / 'show me 2026 vs 2025 monthly trends'. Returns { metric, currentYear, compareYear, rows, totals, charts, presentation, seeAlso }. `rows` is one entry per month with current/compare/change. `charts[0]` is a ready-to-render grouped-bar spec (seriesField='year') — drop straight into a chart library. `totals` gives the year-to-date sum + YoY %. Reads pre-aggregated calendar-month snapshots so it's clean and quick. DEFAULT TO RENDERING THE CHART for any 'X this…

ParameterTypeDescription
metric *stringMetric key (e.g. 'revenue', 'orders', 'aov', 'cvr', 'sessions', 'tickets_total'). Must be one that has been captured as a calendar-month snapshot.
compareYearintegerYear to compare against. Defaults to currentYear - 1.
currentYearintegerYear to use as the current side of the comparison. Defaults to the current calendar year (UTC).
sourcestringFilter by source ('shopify', 'tw', 'ga4', 'google-ads', 'search-console', 'gorgias', 'shipstation'). Omit to sum across sources — usually only useful for metrics that appear in multiple sources (e.g…
storestringFilter by sub-store key (e.g. 'acme-store-us'). Omit to sum across all stores in the workspace.

get_forecast Forecast revenue or orders

Forecast a metric — answers 'what should I expect?' / 'are we on track this month?' / 'project next month'. Returns a per-store `stores` array (each in its OWN currency — never summed across currencies). Each store has: `currentMonth` (month-to-date actual + projected month-end with low/high band, built from the live daily run-rate), `horizon` (future full months with expected/low/high), `method`, `confidence`, explicit `assumptions`, `historyMonths`, and a ready-to-render `charts[0]` line spec (seriesField='series' splits actual vs forecast). HONESTY: every forecast carries a method (mont…

ParameterTypeDescription
horizonintegerNumber of future FULL months to project after the current one (1-3). Defaults to 1.
metricstringMetric to forecast. Defaults to 'revenue'.
storestringSub-store key (e.g. 'acme-store-us'). Omit to forecast every store in the workspace (each in its own currency).

save_target Save a metric target

Store a merchant's GOAL for a metric over a calendar period ('we need £80k this month'). TRIGGER: whenever the user states a target/goal/budget for a metric. This saves the merchant's own target in our DB (NOT a write-back to any connected tool). Pacing (are we on track?) is computed later on read by get_targets — never stored. Money metrics (revenue, aov, ltv, …) MUST be scoped to one store via `store` because the workspace can run multiple currencies; pass targetValue in MAJOR units (80000 for £80k). Non-money metrics (orders, cvr, refund_rate, …) may be workspace-wide (omit store).…

ParameterTypeDescription
metric *stringCanonical metric key, e.g. 'revenue', 'orders', 'aov', 'cvr', 'refund_rate'. Validated against the metric registry.
targetValue *numberThe goal value in MAJOR currency units for money metrics (80000 = £80k), or the raw value for counts/percentages (1200 orders, 2.5 for 2.5% cvr).
notestringOptional free-text context, e.g. 'stretch goal after the BFCM push'.
periodstringCalendar period the target is for. Defaults to 'month'. The target attaches to the CURRENT period of this type.
storestringSub-store key (e.g. 'acme-store-us'). REQUIRED for money metrics. Omit for a workspace-wide non-money target.

get_targets Get metric targets

List the merchant's active targets with LIVE actual-vs-target pacing, recomputed from ground truth on every call (never stored). Each target returns a `pacing` block: status (ahead / on_track / at_risk / behind / too_early / not_paceable), actualToDate, projected month-end with its interval, progressPercent, gapToTarget, currentDailyPace vs requiredDailyRunRate, and days elapsed/remaining. Live month-pacing is available for monthly revenue/orders targets scoped to a store; other targets return the goal and defer to get_yoy_monthly / query_metric_snapshots. HONESTY: the status band is derived f…

ParameterTypeDescription
metricstringOnly targets for this metric.
periodstringOnly targets for this period type.
storestringOnly targets scoped to this sub-store key.

get_daily_metrics Daily metrics

Get daily/period numbers from one of three domains — pass `domain` to pick which, `report` to pick the report within it. `report:"daily"` exists in ALL THREE domains and means a DIFFERENT payload in each — always pass both `domain` and `report` together, never assume "daily" behaves the same across domains. • domain:"funnel" — the daily series WITH sessions/CVR/funnel steps. Reports: daily (default — { period, data, charts, presentation }, each day has revenue, sessions, visitors, cvr, aov, orders, addToCart, reachedCheckout; DEFAULT TO RENDERING THE RELEVANT CHART), traffic_breakdo…

ParameterTypeDescription
domain *stringWhich daily-metrics domain to query. See the tool description for the report list and defaults per domain.
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day) when omitted.
limitintegerFor domain:"operational", report:"daily": number of days to return (default: 30). For domain:"revenue", report:"by_country": number of countries (default: 20).
reportstringReport type — valid values depend on `domain` (see tool description). Defaults to "daily" in every domain if omitted, but "daily" means a different payload per domain.
startDatestringStart date (YYYY-MM-DD). Default window (if omitted) varies by domain — see tool description; domain:"funnel" has no real default, always pass this explicitly.

get_customer_insights Customer retention and lifetime value

Get customer behavior and retention insights. All reports are per-store in multi-store mode — use the store param to target a specific store. Reports: new_vs_returning (revenue/orders/AOV split by first-time vs repeat buyers), repeat_metrics (repeat purchase rate, avg days between purchases, BOTH avgLifetimeValue and medianLifetimeValue, lifetimeValueSkewRatio + distribution note — LEAD WITH MEDIAN when describing 'the typical customer', use mean only when distribution is symmetric; if `lifetimeValueDistributionNote` is present the mean is misleading), cohorts (monthly acquisition cohorts…

ParameterTypeDescription
report *stringReport type
daysInactiveintegerFor lapsed_high_value: days since last order to count as lapsed (default: 90)
endDatestringEnd date (YYYY-MM-DD)
limitintegerFor top_customers and lapsed_high_value: number of results (default: 20)
maxDaysInactiveintegerFor lapsed_high_value: upper bound on inactivity — customers whose last order is older than this are treated as churned, not lapsed, and excluded (default: 365). Raise to see the long tail.
minSpentnumberFor lapsed_high_value: minimum lifetime spend in major units, e.g. 500 for £500 (default: 500)
monthsintegerFor cohorts and retention_curve: number of months to look back for acquisition (default: 6 for cohorts, 12 for retention_curve)
sortBystringFor top_customers: sort by totalSpent or orders (default: totalSpent)
startDatestringStart date (YYYY-MM-DD)

get_refunds Refund analysis

Get refund/return analytics. Reports: summary (total refunds, refund rate, % of revenue — supports compare for WoW/MoM/YoY trend), top_products (most refunded products by amount or rate), by_reason (classifies refund notes into buckets: size_fit_too_small, size_fit_too_large, quality_defect, wrong_item, shipping_late_or_lost, color_style_mismatch, comfort, changed_mind, duplicate, out_of_stock — with top affected products and sample verbatim notes per bucket. The out_of_stock bucket is a fulfilment/overselling signal, not a customer preference. Best for diagnosing high refund rates).

ParameterTypeDescription
report *stringReport type
comparestringFor summary: attach a `comparison` block showing the same metrics for the WoW/MoM/YoY/previous-period window with percentage changes.
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerFor top_products and by_reason: number of results (default: 10)
sortBystringFor top_products: sort field (default: amount)
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_discounts Discount code analysis

Get discount code analytics. Reports: summary (usage rate, AOV impact), top_codes (best performing codes by revenue/usage), code_details (specific code performance — requires 'code' param), by_product (which discount codes were applied to which products — optionally filter by 'code').

ParameterTypeDescription
report *stringReport type
codestringFor code_details: required. For by_product: optional filter by specific discount code.
endDatestringEnd date (YYYY-MM-DD)
limitintegerFor top_codes/by_product: number of results (default: 10/20)
sortBystringFor top_codes: sort field
startDatestringStart date (YYYY-MM-DD)

get_velocity Sales velocity and restock needs

Get sales-velocity analytics from one of two angles — pass `angle` to pick which, `report` to pick the report within it. • angle:"inventory" — the INVENTORY-management angle: how fast stock is moving and what to reorder. Reports: summary (sell-through rate, turnover, health status), by_product (products sorted by sales velocity), restock (reorder quantity recommendations from velocity, lead time, and safety stock — pass leadTimeDays/safetyStockDays; the reason to pick this angle). Use when the question is "what should I reorder and how much?". • angle:"product" — the PRODUCT angle…

ParameterTypeDescription
angle *stringWhich velocity angle to query. See the tool description for the report list and defaults per angle.
report *stringReport type — valid values depend on `angle` (see tool description): inventory has summary/by_product/restock; product has summary/by_product/trend/stagnant.
daysintegerDays for velocity calculation (default: 30 in both angles). Ignored by angle:"product", report:"summary" — that report is always a fixed trailing-30-day aggregate.
filterstringFor by_product: filter by stock status. atRisk = under 7 days of cover; overstocked = over 90 days of cover or stock with no sales; outOfStock = no sellable stock.
leadTimeDaysintegerFor angle:"inventory", report:"restock": lead time in days (default: 14).
limitintegerFor by_product: number of products (default: 20).
maxOrdersintegerFor angle:"product", report:"stagnant": max orders to count as stagnant (default: 0 = zero sales only, use 1-2 for near-zero).
productIdstringFor angle:"product", report:"trend": Shopify product ID (required).
safetyStockDaysintegerFor angle:"inventory", report:"restock": safety buffer days (default: 7).
sortBystringFor by_product: sort field. sellThrough (angle:"inventory") sorts by per-product sell-through rate, LOWEST first, ties broken by most stock held: use it for 'which products have a sell-through under X…
variantIdstringFor angle:"product", report:"trend": Shopify variant ID (optional).

get_marketing_performance Marketing performance and checkout funnel

Get marketing performance dashboard — INCLUDING the canonical checkout funnel. ALSO USE THIS for 'checkout funnel' / 'where do customers drop off' / 'how is my funnel performing' questions; do NOT manually stitch a funnel from get_analytics + get_store_summary. Returns: `funnel` (sessions, addToCartRate, checkoutRate, purchaseRate, cvr — sessions sourced from Shopify TrafficStat when available, GA4 fallback otherwise, pixel as last resort), `_pixelFunnel` (Triple Whale pixel-tracked equivalents with step-by-step ratios for drop-off SHAPE analysis), `channels` (revenue/sessions/cvr per chan…

ParameterTypeDescription
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_spend_reconciliation Reconcile ad spend across sources

Reconcile ad-spend numbers between Triple Whale's pixel attribution and the ad-platform APIs (Google Ads, Meta, TikTok). Same channel, different numbers — pixel typically captures 10-30% of true spend due to ad blockers, consent banners, and iOS ATT. Returns per-channel platform-API spend, TW pixel spend, ratio, severity (match / moderate / severe / critical), trueRoas (TW revenue / platform spend), pixelRoas (from TW), and a recommendation per channel. Use whenever quoting ROAS — pixel ROAS in isolation is reliably wrong on paid channels with bad pixel coverage.

ParameterTypeDescription
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_products_by_channel Products by sales channel

Get products with marketing channel attribution showing which channels drive sales for each product. Attribution uses Triple Whale last-click data joined to Shopify order line items — requires Triple Whale to be connected. When Triple Whale is not connected, all orders appear under 'unattributed'. Use for questions like 'Which channels drive sales of product X?' or 'What products does Facebook sell?'

ParameterTypeDescription
_offsetintegerPagination offset. If a response's _pagination.hasMore is true, call again with _offset to page through the full set.
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerNumber of products to return (default: 10, max 100).
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_cart_affinity Products bought together

Co-purchase / market-basket analysis. Given an anchor product (productTitle), returns other products frequently bought with it, ranked by lift. Reports: basket (same-order co-purchase — best for bundles, 'frequently bought together' widgets, post-checkout upsells), lifetime (same-customer across all their orders — best for email flows and longer-horizon recommendations; also returns avgDaysToCoBuy for sequencing). Each pair has support, confidence, lift (>3 strong, 1.5–3 moderate, <1.5 weak), and a verdict. Co-occurrences below `minCoOccurrences` are suppressed because lift is unstable o…

ParameterTypeDescription
productTitle *stringAnchor product title (case-insensitive substring match). Required.
report *stringbasket = same-order co-purchase; lifetime = same-customer across orders.
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerNumber of co-products to return (default: 10, max: 25).
minCoOccurrencesintegerSuppress pairs with fewer than this many co-occurrences (default: 3). Raise to 5–10 for high-volume stores; lower to 2 for low-volume stores or specific anchor products.
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday. For lifetime: bounds anchor acquisition; candidate purchases are looked up across the customer's full history.

get_store_summary Store summary

Get overall store metrics from Shopify order data ONLY: revenue, orders, average order value, items sold, discounts, unique customers — all for the specified period. Includes percentage changes vs prior period. Also returns all-time totals (orders, products, customers). Use this for high-level store performance questions. For an overview spanning ALL connected sources (traffic, email, support, reviews, etc.) use get_complete_dashboard instead.

ParameterTypeDescription
endDatestringEnd date in ISO format (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
startDatestringStart date in ISO format (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

query_orders Search orders

List individual orders matching filters: date range, financial status, customerId, min/max order total, order tags — sortable by date or total. Returns one row per order with name, status, fulfillment, orderTotal (formatted), items count, country, tags, and date. Use for 'show me recent orders', 'orders over $500', 'this customer's pending orders', 'orders tagged wholesale'. DISAMBIGUATION: for AGGREGATE order analytics (counts/revenue by status, country, or product) use get_orders; to look up ONE known order by its #name or ID with line items, use get_order.

ParameterTypeDescription
customerIdstringFilter to orders for a specific customer (Shopify customer ID)
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday.
limitintegerNumber of results (default: 20, max: 50)
maxTotalnumberMaximum order total in the store currency, major units
minTotalnumberMinimum order total in the store currency, major units (e.g. 3000 = £3,000 on a GBP store)
offsetintegerPagination offset
sortBystringSort field (default: processedAt)
sortOrderstringSort order (default: desc)
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.
statusstringFilter by financial status
tagMatchstringHow to match multiple tags: 'any' (default, order has at least one) or 'all' (order has every listed tag).
tagsarrayFilter to orders carrying these Shopify order tags. Matching is case-insensitive. By default an order matches if it has ANY of the tags (see tagMatch). E.g. ['wholesale'] or ['gift','vip'].

get_order Look up an order

Look up a specific order with full line item details (product, variant, SKU, quantity, price, vendor). Use orderName for user-facing IDs like '#1001', or orderId for Shopify numeric IDs. Also supports orderIds (array) to look up multiple orders at once — useful for cross-referencing with Triple Whale attribution data.

ParameterTypeDescription
orderIdstringShopify numeric order ID e.g. '5559266041988'
orderIdsarrayArray of Shopify numeric order IDs for batch lookup (max 50)
orderNamestringOrder name e.g. '#1001' or '1001'

get_orders Order analytics

Get order analytics by dimension. Reports: by_status (order counts/revenue by financial status), by_country (geographic sales breakdown — supports compare for WoW/MoM/YoY: every listed country gets previousOrders/previousRevenue/revenueChange/ordersChange, plus the top rising/falling countries), by_product (BEST FOR: 'how many customers bought product X?', 'which products have the most unique buyers?', product-level customer counts. Returns uniqueCustomers, orderCount, unitsSold, and revenue per product. Use this whenever the question involves customers AND products together), by_tag (order…

ParameterTypeDescription
report *stringReport type
comparestringFor by_country: attach a `comparison` block with rising/falling countries vs the WoW/MoM/YoY/previous-period window.
endDatestringEnd date (YYYY-MM-DD)
lagDaysintegerFor by_tag: end the windows this many days back so the current week is complete days (default 1). Raise it if a marketplace app applies its order tag with a delay.
limitintegerFor by_country: number of countries (default: 15; use _offset for the rest). For by_tag: max tags returned (default: 20).
lookbackWeeksintegerFor by_tag: number of prior weekly windows to use as the baseline (default 4, range 2-12).
sortBystringFor by_product: sort field (default: revenue)
startDatestringStart date (YYYY-MM-DD)
tagstringFor by_tag: focus a single order tag (case-insensitive). Omit to scan every tag and surface the ones dropping.

get_top_products Top products and category margins

Get top selling products ranked by revenue or quantity. Set level to 'variant' to break down by variant (size, colour, etc.) — includes SKU, discount, and profit margin when cost data is available. Set level to 'category' for a revenue / COGS / gross-profit / margin-% rollup by product TYPE (e.g. 'Sewing Machines vs Fabric') — the structured answer to category-P&L / margin-by-category questions (margin is computed only over cost-configured units, with a costCoveragePercent per category). Optionally filter variants by productTitle. Supports compare for WoW/MoM/YoY trend — returns top 5 ri…

ParameterTypeDescription
comparestringAttach a `comparison` block with the top rising/falling/new products vs the WoW/MoM/YoY/previous-period window.
endDatestringEnd date (YYYY-MM-DD)
levelstringGrouping level: product (default), variant (by size/colour/SKU), or category (revenue/COGS/gross-profit/margin by product type)
limitintegerNumber of results (default: 10)
metricstringSort by: revenue or quantity (default: revenue)
productTitlestringFor variant level: filter to variants of a specific product (partial match)
startDatestringStart date (YYYY-MM-DD)

get_product_catalog Product catalog

Get product catalog with inventory levels, pricing, cost, margins, status, and SEO metadata. Returns: title, vendor, productType, price, cost, margin, marginPercent, totalInventory, seoTitle (Shopify global.title_tag), seoDescription (Shopify global.description_tag), productUrl (full storefront URL — use this directly instead of guessing). Use for questions about products, pricing, profitability, cost price, stock levels, or SEO/meta tags.

ParameterTypeDescription
limitintegerNumber of products (default: 20)
storestringFilter to a specific store domain. Omit to query all connected stores.

get_campaign_impact Campaign impact

Did THAT campaign actually work? Cross-source synthesis tool that measures the real impact of a specific Klaviyo campaign by comparing the post-send window against a DAY-OF-WEEK-ALIGNED baseline (same N days one week earlier). Returns: the campaign metadata, Klaviyo's own attribution claim, the actual Shopify orders/revenue/new-customers in the post-send window, the baseline counterfactual, the lift (window - baseline), and an `attributionAnalysis` reconciling Klaviyo's claim against measured lift. Use this for 'did the SUMMER20 campaign work?' / 'how did the May newsletter perform?' / 'is my…

ParameterTypeDescription
campaignIdstringKlaviyo internal campaign ID (exact match). Use this when you already know it; otherwise use campaignName.
campaignNamestringFuzzy match on campaign name (case-insensitive substring). Returns the most recent match; surfaces a disambiguation block if multiple found.
storestringFilter to a specific store domain. Omit to query all connected stores.
windowDaysintegerPost-send measurement window in days (default 7). Klaviyo's attribution uses 5 days for campaigns; 7 captures the bulk of impact for most consumer goods. Increase for high-AOV considered purchases (ma…

get_product_health Product health check

CROSS-SOURCE PRODUCT HEALTH SCAN — one call that returns per-product reviews + refunds + sales velocity + inventory + a composite 'needs attention' score (0-100). Use this for 'which products need fixing?' / 'what should I look at?' / 'are there any product issues?' / 'which products are performing badly?'. Saves the LLM from stitching get_top_products + get_refunds + get_reviews + get_inventory manually — synthesis is consistent and the composite score is grounded in the same heuristic each time. Returns each product's underlying signals (refund rate, review rating, review count, stock le…

ParameterTypeDescription
endDatestringEnd of sales window (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerMax products to analyse, ordered by recent revenue (default: 50, max: 100).
minAttentionScoreintegerFilter to products with attentionScore >= this value (default: 0 = all). Set to 30 to see only products with a flagged signal.
startDatestringStart of sales window (YYYY-MM-DD). Defaults to 30 days ago.
storestringFilter to a specific store domain. Omit to query all connected stores.

get_product_analytics Product sales analytics

Get Shopify product sales analytics — units sold and revenue per product from ShopifyQL. Requires Shopify Plus or Advanced. NOTE: Views, add-to-cart, and purchase funnel counts are no longer available from ShopifyQL (Shopify removed these fields) — use get_marketing_performance for funnel analysis or get_analytics(ecommerce) for GA4-based product funnel data. Reports: summary (total units/revenue), top_products (ranked by revenue or units sold), product_detail (daily units/revenue for a specific product).

ParameterTypeDescription
report *stringReport type
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerNumber of results (default: 20)
productIdstringFor product_detail: Shopify product ID
sortBystringFor top_products: sort field (default: revenue)
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_collections Collections

Get product collections and their contents, including SEO metadata. Reports: list (all collections with product counts plus seoTitle/seoDescription), products (products in a specific collection with pricing, inventory, SEO, and optional sales data). seoTitle/seoDescription correspond to Shopify's global.title_tag and global.description_tag metafields. Use for 'how many products in the sandals collection?', 'what products are in collection X?', 'which collection products sell best?', or to inspect collection/product SEO tags.

ParameterTypeDescription
report *stringReport type
collectionIdstringFor products: Shopify collection ID
collectionTitlestringFor products: search by collection title (partial match)
endDatestringFor products: include sales data to this date (YYYY-MM-DD)
limitintegerNumber of results (default: 50)
startDatestringFor products: include sales data from this date (YYYY-MM-DD)

get_customers Customer segments and lists

Get customer analytics by dimension. Reports: segments (one-time/returning/VIP/at-risk), top (by spend or orders — includes customerId for each customer), by_country (geographic distribution — country is derived from order shipping address, not customer records; Shopify does not expose customer country without protected data access approval), customer_history (full order history with line items for a specific customer — use customerId from the 'top' report, or rank e.g. rank=1 for top customer, or tag to find by customer tag), tag_segments (size behavioural sub-segments by Shopify tag, s…

ParameterTypeDescription
report *stringReport type
customerIdstringFor customer_history: Shopify customer ID (from the 'top' report's customerId field)
limitintegerNumber of results (default: 10)
minTagVolumeintegerFor tag_segments: also surface any other (non-requested) tag with at least this many customers in scope (default 200).
purchaserFilterstringFor tag_segments: which cohort to segment (default non_purchasers = ordersCount 0).
rankintegerFor customer_history: look up customer by rank in top customers list (e.g. 1 = top spender)
sortBystringFor top: totalSpent or orders (default: totalSpent)
tagstringFor customer_history: find customer by tag
tagsarrayFor tag_segments: tags to count explicitly and cross-tabulate (matched case-insensitively; always included even below minTagVolume).

get_inventory Inventory levels

Get inventory analytics. Reports: summary (activeProducts count, totalVariants, outOfStock variant count, lowStock variant count with >0 and ≤10 units, totalUnits, active locations count), low_stock (products needing reorder — threshold defaults to 10 units), out_of_stock (zero-inventory variants), by_location (per-warehouse breakdown with location name, total SKUs tracked, units on hand).

ParameterTypeDescription
report *stringReport type
limitintegerNumber of products (default: 20)
thresholdintegerFor low_stock: stock level threshold (default: 10)

get_connector_data Data from a connected app

Data from one connected third-party connector: pick `connector`, then `report`. For what each report returns, its parameters and gotchas, call get_help("<connector>"). • triple-whale (attribution): summary, attributions, by_channel, product_attribution, channel_by_model, journey, pps • klaviyo (email): campaign_summary, campaigns, top_campaigns, flow_summary, flows, top_flows, list_summary, lists, product_attribution, signup_trends, available_metrics • sendy (email lists, current snapshot only): list_summary, lists • gorgias (support): summary, daily, tickets, by_channel, satisfaction,…

ParameterTypeDescription
connector *stringWhich third-party connector to query. One that isn't connected returns `<connector>_not_connected` with how to connect it; call get_data_sources to see what is connected.
report *stringReport name. The tool description lists them per connector.
_offsetintegerPagination offset; use when _pagination.hasMore is true.
adGroupIdstringgoogle-ads ads/keywords: one ad group.
attributionModelstringtriple-whale attributions/by_channel/product_attribution.
brandTermsstringsearch-console branded_split: comma-separated brand terms.
campaignIdstringgoogle-ads: one campaign (which reports honour it: get_help("google_ads")).
categorystringtriple-whale summary: metric category.
channelstringgorgias tickets; triple-whale attributions, by_channel, product_attribution: filter by channel (e.g. google-ads).
customerIdstringgoogle-ads: one account.
daysintegerrecharge: days AHEAD to forecast. youtube, swish: days BACK.
dimensionstringclarity by_dimension (required).
directionstringsearch-console keyword_movers/page_ranking_changes.
endDatestringYYYY-MM-DD.
eventTypestringtriple-whale journey: one event type.
expandNegativesbooleangoogle-ads campaign_settings: include negative keyword text.
granularitystringtriple-whale by_channel: total, daily or by_store. smile points_activity: day, week or month.
groupBystringtriple-whale channel_by_model.
intervalstringklaviyo signup_trends.
limitintegerRows per call, max 100 (google-ads search_terms: 1000). Larger values are reduced and _limitNote says so; page with _offset.
maxScoreintegerreviewsio unanswered: this rating or lower.
metricstringklaviyo top_campaigns/top_flows: revenue, openRate or clickRate.
minImpressionsintegersearch-console: minimum impressions.
modelstringtriple-whale channel_by_model: attribution model.
newCustomersOnlybooleantriple-whale channel_by_model.
orderBystringyoutube videos: sort field.
pagestringsearch-console: on top_queries, ONE exact page (its search terms); on other reports, a path filter like pagePath.
pagePathstringsearch-console, any report: only URLs containing this path, e.g. '/products/'.
periodTypestringtriple-whale: rolling window. Omit it and pass dates for a fixed range.
querystringyoutube search_transcripts (required).
searchstringgorgias tickets: keyword search.
segmentstringgoogle-ads campaigns: 'day' adds a daily series per campaign (max 20 campaigns).
siteUrlstringsearch-console: exact property siteUrl.
sortBystringsearch-console top_queries/top_pages: clicks or impressions. smile top_members: pointsBalance, totalEarned or totalSpent.
sourcestringtriple-whale journey/pps: acquisition source (not the connector).
startDatestringYYYY-MM-DD.
statusstringklaviyo, gorgias, woocommerce, google-ads: filter by status.
storestringsearch-console: store key, picks that store's property.
surveyIdstringreviewsio survey_responses.
videoIdstringyoutube video_details (required).
viewstringtriple-whale journey/pps: breakdown view.

ask_moby Ask Triple Whale's Moby

ESCAPE HATCH: ask Triple Whale's own AI assistant (Moby) a free-form question, answered by Triple Whale's servers against their full dataset. Use ONLY when no structured tool covers the question — prefer get_connector_data(connector:'triple-whale') / get_marketing_performance / get_spend_reconciliation first: they're faster (Moby takes 20-60 seconds), deterministic, and carry confidence/freshness signals. Good Moby use-cases: TW-specific features we don't sync (cohort LTV projections, TW custom metrics/expressions, creative-level breakdowns), or cross-checking a number against what Triple Wh…

ParameterTypeDescription
question *stringThe question, in natural language, as you would ask Triple Whale's UI assistant. Include the time window explicitly (e.g. 'in the last 30 days').
storestringFor multi-store accounts: which store's TW instance to ask (matches the instance's store assignment). Omit for single-instance accounts.

get_markets Shopify Markets performance

Get Shopify Markets data — geographic market definitions and per-market revenue performance. Reports: markets (list of configured markets with their assigned countries and currencies), performance (revenue, orders, AOV, and revenue share broken down by market for a date range). Use this to understand which geographic markets are configured and how revenue is distributed across them. Note: market data requires the market sync to have run at least once; orders are attributed to markets using Shopify's market field (Plus merchants) or a country-code fallback (all merchants).

ParameterTypeDescription
report *stringReport type: markets (configured markets and countries) or performance (revenue by market)
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_query_to_url Search queries by landing page

Join Google Search Console queries with Shopify product sales — answers questions that pure SEO or pure sales tools can't. Reports: by_url (given a product URL, return its top driving organic queries plus the matching product's sales/orders/refunds and an implied click-to-purchase rate), unconverting_pages (URLs that received >= minClicks organic clicks but the matching product sold <= maxSales units in the same window — flags 'SEO-visible-but-not-converting' listings), top_pages_with_sales (top organic pages joined with their product sales, ranked by clicks × orderCount so high-throughpu…

ParameterTypeDescription
report *stringReport type
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerNumber of results (by_url: top queries to return; unconverting_pages / top_pages_with_sales: max URLs returned). Default 20.
maxSalesintegerFor unconverting_pages: maximum units sold for the matched product in the same window (default 2). 0 means 'pages with zero sales only'.
minClicksintegerFor unconverting_pages: minimum organic clicks for a URL to be considered (default 50). Lower for low-traffic stores; raise to focus on bigger problems.
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.
urlstringFor by_url: the exact URL as it appears in Search Console (https:// included, with or without trailing slash to match how GSC indexed it).

get_reviews Product reviews

Get product review analytics (Yotpo, Reviews.io, or Judge.me). Reports: summary (average rating, distribution), trends (daily volume/score), top_rated (best reviewed products), lowest_rated (worst reviewed), recent (latest reviews), by_product (all reviews for a specific product — requires productId or productTitle), search (keyword search in reviews), timing (days from purchase to review), sales_impact (reviewed vs unreviewed product sales), themes (BEST FOR 'what do customers complain about?' — aggregates review text into themes like sizing/comfort/quality/shipping with complaint counts,…

ParameterTypeDescription
report *stringReport type
endDatestringEnd date (YYYY-MM-DD)
keywordstringFor search: keyword to find in review content
limitintegerNumber of results
maxScoreintegerFor recent/search: maximum star rating (1-5)
minReviewsintegerFor top_rated/lowest_rated: minimum review count (default: 3)
minScoreintegerFor recent/search: minimum star rating (1-5)
productIdstringFor by_product/themes: Shopify product ID (numeric or GID) to scope to one product
productTitlestringFor by_product/themes: product title (partial match, case-insensitive)
providerstringReview provider (auto-detected if omitted)
skustringFor search: filter to specific product SKU
startDatestringStart date (YYYY-MM-DD)

get_abandoned_checkouts Abandoned checkouts

Get cart abandonment analytics. Reports: stats (trackedAbandonmentRecords, abandonedCheckouts, recoveredCheckouts, recoveryRate %, abandonedValue, lostRevenue, abandonedAgeDistribution — how long ago the still-unrecovered carts were abandoned: 0-24h, 24-48h, 2-7d, 7-30d, 30d+), top_products (most frequently abandoned products with count, quantity, and total value). IMPORTANT UNIVERSE: figures cover only Shopify's abandoned-checkout records; completed purchases never enter this dataset, so do NOT derive an abandonment rate from these counts or compare them to order totals. Shopify API limitat…

ParameterTypeDescription
report *stringReport type
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerFor top_products: number of products (default: 10)
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_analytics Google Analytics traffic

Get Google Analytics (GA4) website traffic and e-commerce data. **DO NOT USE THIS FOR CHECKOUT FUNNEL OR CVR QUESTIONS** — call `get_marketing_performance` instead, which uses Shopify TrafficStat (the canonical session source) and Shopify orders. GA4 over-counts sessions (~2-3× higher than Shopify TrafficStat for many stores due to subdomain/bot inclusion) which produces a CVR roughly half the real Shopify-native rate. Use GA4 for: traffic sources (channels, referrers, AI assistants), device/country/browser splits, landing-page performance, GA4-specific event counts — things TrafficStat d…

ParameterTypeDescription
report *stringReport type. Use 'by_source' for AI / ChatGPT / Perplexity / Claude / referrer-level traffic questions and 'what changed in my traffic sources'. Use 'top_pages' for most-visited pages or landing page…
comparebooleanFor by_source: attach the prior-window comparison (per-source deltas, newSources, disappearedSources, spam-referrer flag). Defaults to true; pass false to skip.
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today).
limitintegerFor by_country, top_products, and by_campaign: number of results (default: 20; by_campaign default 50)
mediumstringFor by_campaign: filter to a UTM medium, e.g. 'email' to isolate the email program. Omit to include all tagged campaigns.
periodTypestringShorthand time window (default: last30days). Expanded to startDate/endDate automatically. Ignored if startDate is provided explicitly.
propertyIdstringFilter to a specific GA4 property. Works on ALL reports. Use the exact propertyId from the summary response (e.g. 'properties/375762433'). Omit to get aggregated data across all properties. Always use…
sortBystringFor top_products: revenue or units. For by_campaign: revenue (default), sessions, or orders.
startDatestringStart date (YYYY-MM-DD). Overrides periodType. Defaults to a 30-day window ending yesterday.

get_ga4_funnel Google Analytics funnel

Run a real GA4 funnel report — step-by-step conversion through a sequence of events, with optional breakdown and next-action analysis. This is a LIVE call to the GA4 Data API (not synced data), so it can answer 'where do users drop off between viewing a product and purchasing?' with GA4's own funnel engine. Each step is an event name (e.g. page_view, add_to_cart, begin_checkout, purchase) or a full GA4 FilterExpression. Returns funnelTable (completions + completion rate per step), funnelVisualization, and propertyQuota. For the CANONICAL checkout funnel and CVR use get_marketing_performance…

ParameterTypeDescription
steps *arrayOrdered funnel steps. Each: { name, event } for a simple event filter, or { name, filterExpression } for a full GA4 FunnelFilterExpression.
breakdownDimensionstringOptional dimension to segment the funnel by (e.g. 'deviceCategory', 'country').
endDatestringEnd date (YYYY-MM-DD). Defaults to yesterday (GA4 data is T-1).
nextActionDimensionstringOptional dimension to analyse what users do after each step (e.g. 'eventName', 'pagePath').
propertyIdstringFilter to a specific GA4 property (e.g. 'properties/375762433'). Omit to use the configured property.
startDatestringStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

get_ga4_dimensions Google Analytics breakdowns

Discovery tool: list the GA4 property's custom dimensions and custom metrics (with apiName, uiName, description), plus the standard dimension/metric API names available on the property. Call this to find valid field names before building a get_ga4_funnel report or interpreting custom events. LIVE GA4 Admin/Data API call.

ParameterTypeDescription
propertyIdstringFilter to a specific GA4 property (e.g. 'properties/375762433'). Omit to use the configured property.

get_insights Saved insights

Get the business improvement checklist (the FINDINGS to act on). If insights exist, returns the current checklist with status. If no insights exist (or refresh is requested), returns a data bundle with all key metrics from connected sources — use this data to generate actionable business recommendations (typically 3–8, as many as the data supports), then call save_insights to store them. You can also call save_insights with a single insight at any time during conversation. Use report: 'thread' (with threadId or insightId) to retrieve a linked sequence of related findings as one story. NOTE…

ParameterTypeDescription
categorystringFilter to a single category.
includeCompletedbooleanDefault true. Set to false to return only active (open) insights.
insightIdstringFor report: 'thread' — resolve the threadId from this insight and return the full thread (alternative to passing threadId directly).
refreshbooleanSet to true to generate fresh insights even if existing ones are present. Default: false — returns existing checklist.
reportstringDefault: 'checklist'. 'thread' retrieves a linked sequence of related findings as one story — requires threadId or insightId. (For fix outcomes / win-rate, use get_interventions(report: 'outcomes').…
statusFilter by status. Pass a single value (e.g. 'open') or an array (e.g. ['open','addressed']) for OR semantics. Allowed values: open, addressed, superseded, dismissed.
tagsarrayFilter to insights that contain ANY of these tags (OR semantics). E.g. ['seo'] or ['paid'].
threadIdstringFilter to a single thread (works on checklist and thread reports). Used to view a story end-to-end without category/tag filtering.

save_insights Save insights

TRIGGER: Whenever you surface a problem or opportunity from the data, OFFER to save it as an insight and confirm before writing — don't auto-save. Make the offer concrete and inline: 'Want me to save this as an insight to track?'. Findings vary in significance; the user decides what belongs on the checklist. Insights are OBSERVATIONS (findings to act on) — when a fix is actually SHIPPED, that's a separate thing: call set_intervention (it auto-flips the linked insight to 'addressed' and owns the before/after verdict). Don't model 'fix applied' or '30-day check' as insights. Call this AFTER…

ParameterTypeDescription
insights *arrayArray of business insights to save (any number)
replacebooleanSet to true to replace all active (non-completed) insights. Default: false (appends).

update_insight Update an insight

Update an insight (a FINDING) — set its status, or edit its content. Allowed status: open / addressed / superseded / dismissed. Note: you normally don't set 'addressed' by hand — that happens automatically when set_intervention links this finding to a shipped fix. An insight carries NO fix verdict; 'did it work' lives on the linked intervention (see get_interventions). Use this to dismiss/supersede a finding, edit its text/tags, or attach evidence snapshots.

ParameterTypeDescription
insightId *stringThe insight ID to update
actionstringUpdated action step
addTagsarrayAppend these tags to the existing set without removing others. Useful for adding workflow tags like 'fix-applied' or '30-day-check' without overwriting.
categorystringUpdated category
completedboolean(Legacy) Mark as completed. Setting true without a status sets status='addressed'; false sets status='open'.
deletebooleanRemove this insight entirely — use when the user says it's not relevant or not an issue
descriptionstringUpdated description
dismissedboolean(Legacy) Mark as dismissed. Setting this to true without a status sets status='dismissed'.
linkSnapshotIdsarrayAttach existing metric snapshots (record_metric_snapshot rows) to this insight as supporting evidence for the finding. Pass the snapshotIds (returned from query_metric_snapshots). The snapshots appear…
notesstringFree-text note about this finding. Stored alongside the insight for future reference.
parentInsightIdstringLink this insight to a predecessor. The threadId is auto-managed: if the parent has one, it's inherited; otherwise a fresh threadId is generated and applied to both. Pass an empty string to detach the…
prioritystringUpdated priority
removeTagsarrayRemove these tags from the existing set, leaving others intact.
statusstringWorkflow state. Setting status auto-syncs the legacy completed/dismissed mirror booleans.
tagsarrayReplace the insight's tags with this list (e.g. ['seo','fix-applied']). Pass [] to clear all tags.
threadIdstringSet or change this insight's threadId directly. Use empty string to clear.
titlestringUpdated title
unlinkSnapshotIdsarrayDetach the given snapshotIds from this insight (sets their insightId to null). Use to correct a wrong link.

record_metric_snapshot Record a metric snapshot

Record one or more structured metric snapshots for time-series analysis. Use this whenever you cite a metric in an insight, weekly digest, or benchmark — instead of (or in addition to) burying it in prose. Each snapshot is queryable later via query_metric_snapshots, e.g. 'show CVR for UK over the last 6 months'. Always pass canonical metric keys from the registry (call query_metric_snapshots with no args to list them, or see the error hint when you pass an unknown key). Provide both a current value and, ideally, a baseline value so trajectories can be plotted. When a snapshot was produced by…

ParameterTypeDescription
snapshots *arrayArray of metric snapshots to record

query_metric_snapshots Metric snapshot history

Query recorded metric snapshots as a time series. Use to answer 'show me all CVR snapshots for UK over the last 6 months', 'how has ROAS evolved by month?', etc. Returns canonical snapshot data (matches the dashboard and monthly digest exactly) plus a `charts` array of ready-to-render line chart specs (one per metric; multi-series when the query spans multiple stores or segments). DEFAULT TO RENDERING THE CHART when the LLM is asked to show a metric over time — these are the SAME numbers the merchant sees on /dashboard/metrics. Call with no args (or just `list: true`) to get the full registr…

ParameterTypeDescription
confidenceFilter by confidence. Pass 'high' / 'medium' / 'low' to match exactly, or 'minHigh' / 'minMedium' to require AT LEAST that level (treats null as 'high'). Useful for benchmarks where you only want trus…
endDatestringOnly include snapshots whose periodStart is <= this date (YYYY-MM-DD)
insightIdstringOnly snapshots linked to this insight
limitintegerMax snapshots to return (default 100, max 500)
listbooleanIf true, returns the metric registry (canonical keys, units, descriptions). Use this when you don't know which metrics are available.
metricstringCanonical metric key. Omit to return snapshots across all metrics (filtered by other params).
periodKindstringFilter by period anchoring. 'calendar' = discrete buckets only; 'rolling' = trailing windows only. Mixing the two in a single time series silently distorts trends.
periodLengthstringFilter by bucket size — combine with periodKind to e.g. fetch only calendar-month rows.
segmentstringFilter to a specific segment
sourcestringFilter by source ('shopify', 'ga4', 'tw', etc.)
startDatestringOnly include snapshots whose periodEnd is >= this date (YYYY-MM-DD)
storestringFilter to a specific store/region key. Accepts short form ('acme-store') or full domain ('acme-store.myshopify.com') — both normalize to the short form used in storage.

set_intervention Log a fix or change

TRIGGER: Call WITHOUT asking whenever the user applies or ships a fix. 'Fix' covers any shipped change — SEO/copy/ads/UX/ops, AND code/schema/connector changes. Distinct from save_insights (which captures observations) — this is for tracking actions: 'I changed X, hypothesised Y, will measure at dates [a,b,c]'. Auto-captures the most recent matching snapshots as baseline (for each {store, metric} in trackedMetrics), so you don't have to manually record baselines first. Use complete_intervention later to capture the post-fix snapshots and compute deltas. INPUT-MINIMAL EXAMPLE: set_intervent…

ParameterTypeDescription
description *stringWhat was actually changed (e.g. 'Added hreflang tags to all PDPs to fix country-mismatch issue').
type *stringCategory of intervention.
appliedAtstringISO date (YYYY-MM-DD) the fix was ACTUALLY applied, for logging it retroactively (default: now). The baseline auto-lookup only considers snapshots within 60 days BEFORE this date — pass the real dat…
checkDatesarrayISO dates (YYYY-MM-DD) for planned check-ins, e.g. ['2026-06-07','2026-07-07','2026-08-07']. Stored for the dashboard / reminders; not enforced by the system.
expectedMetricsobjectOptional. Per-metric expectation, e.g. {organic_clicks: {deltaPercent: 15, direction: 'up'}}. Used at completion time to flag whether outcomes met expectations.
hypothesisstringWhy you think it'll work (e.g. 'US property losing clicks to UK; hreflang should restore correct routing').
linkedInsightIdsarrayInsights this intervention is acting on (the original finding(s) that prompted it). Captured for traceability — they're not modified.
notesstringFree-text context (excluded scope, caveats, etc.).
storestringThe store/region this fix applies to. Either short ('acme-store-us') or full ('acme-store-us.myshopify.com') — both normalize.
trackedMetricsarrayMetrics to track for before/after comparison. Each entry is either a canonical metric key string (e.g. 'organic_clicks') OR an object {metric, segment?, source?} for dimensional pinning. Use the objec…
watchobjectOptional threshold watch evaluated on every get_briefing, so a breach SURFACES rather than being recomputed by hand each time. Shape: {metric:'orders'|'revenue', windowDays: 1-90, op:'lt'|'lte'|'gt'|'…

complete_intervention Close a fix with its result

TRIGGER: Call WITHOUT asking once an applied intervention's check date has passed. Find candidates with get_interventions(dueForCheckIn: true). Attaches the latest RECORDED post-fix snapshot for each tracked metric (a snapshot whose periodStart is on/after the fix's appliedAt) as the 'post' side, computes deltas vs baseline, and flags whether each metric met its expected delta. Google Ads (source 'google-ads', from synced stats) and Triple Whale (source 'tw', live from Triple Whale for the exact window) metrics are measured automatically: the post side runs from the day after the change to yes…

ParameterTypeDescription
interventionId *stringThe intervention to close.
verdict *stringYour verdict. The system also computes per-metric outcomes — your verdict is the overall judgment.
campaignIdstringGoogle Ads: measure this record's google-ads tracked metrics on this one campaign instead of the whole account (for fixes logged before campaign-level tracking).
forcebooleanClose even when no post-fix snapshot exists for any tracked metric (verdict then rests on your external evidence, with no computed delta). Default false — without it, a measured verdict is refused s…
notesstringOptional note about what was observed, e.g. 'US clicks recovered but DE flatlined — partial win'.

update_intervention Edit a logged fix

TRIGGER: Call WITHOUT asking when an existing intervention's details need correcting — a check date that should move, a note to add, a hypothesis to sharpen, or a threshold watch to attach. Interventions could previously only be created and closed, so a wrong check date stayed wrong and surfaced as due on the wrong day; closing and re-creating is NOT a workaround, because it discards the captured baseline snapshots and the applied date. NOTES APPEND by default with a date stamp, since corrections accumulate — pass notesMode:'replace' only to deliberately overwrite. Verdict and status are n…

ParameterTypeDescription
interventionId *stringThe intervention to edit. Ids are per-shop — one from another store will not resolve.
addCheckDatesarrayISO dates to ADD, leaving the rest in place. Result is deduped and sorted.
checkDatesarrayREPLACE the whole check-date set with these ISO dates (YYYY-MM-DD). To move a single date, prefer addCheckDates/removeCheckDates so the others cannot be dropped by accident. Cannot be combined with ad…
descriptionstringCorrect what was changed.
expectedMetricsobjectReplace the per-metric expectations, e.g. {orders: {deltaPercent: 10, direction: 'up'}}.
hypothesisstringCorrect or sharpen why it was expected to work.
notesstringNote to record. APPENDED under a date stamp by default, preserving earlier corrections.
notesModestringDefault 'append'. Use 'replace' only when deliberately discarding the existing notes.
removeCheckDatesarrayISO dates to REMOVE, leaving the rest in place. Pair with addCheckDates to move one date.
watchobjectAttach (or with null, clear) a threshold watch evaluated on every get_briefing, so a breach SURFACES instead of being recomputed by hand. Shape: {metric:'orders'|'revenue', windowDays: 1-90, op:'lt'|'…

get_interventions Logged fixes and outcomes

List interventions (the actions/fixes that were shipped) and report their measured outcomes. This is the SINGLE source of truth for 'did it work' — insights (findings) never carry a verdict. Use report: 'status' for a one-call picture of 'what fix-work is open' (due for check-in / in flight / recently closed + win rate — best for 'where did we get to?' / session start); report: 'list' (default) for the full rows; report: 'outcomes' for 'fixes that worked vs didn't' (buckets closed interventions by verdict + win rate). Filter by insightId to answer 'how did the fix(es) for this finding turn…

ParameterTypeDescription
dueForCheckInbooleanIf true, only return interventions whose next checkDate has passed and status is still 'applied'/'under_review'.
insightIdstringOnly interventions that link back to this insight (via linkedInsightIds) — i.e. the fixes prompted by a specific finding.
limitintegerMax results (default 30).
reportstringDefault 'list'. 'status' = consolidated open-work view (dueForCheckIn + inFlight + recentlyClosed + winRate) in one call, ideal for orienting at the start of a session. 'outcomes' buckets closed inter…
sincestringOnly interventions appliedAt >= this date (YYYY-MM-DD).
statusstringFilter by lifecycle status.
storestringFilter by store key.
typestringFilter by category (technical_seo, paid_optimization, etc.).
verdictstringFilter by closing verdict (only for closed interventions).

get_store_notes Store notes

Return all merchant-attached LLM context notes for a store (or all stores if omitted). Notes are authoritative caveats the merchant has added — e.g. 'one B2B customer skews retention', 'Q2 budget freeze, don't suggest more ad spend', 'pre-2026-03 data is partial'. The same notes are auto-injected into every store-scoped tool response as _storeNotes, so calling this directly is only needed when you want a full picture before answering a session-opening question.

ParameterTypeDescription
storestringOptional. Filter to a specific store. Omit to get notes for all stores the caller has access to.

get_timeline Store event timeline

Merged, date-ordered timeline of everything that happened to the business: interventions (changes the merchant applied, and when their verdict landed) plus store-context notes (campaign launches, migrations, budget freezes, data quirks the merchant recorded). Use this to line dated events up against a metric movement — 'revenue dipped on the 12th, what changed around then?' — instead of calling get_interventions and get_store_notes separately and stitching them yourself. Returns events sorted most-recent-first, each with a date, kind, store, and detail. Includes expired/closed items within…

ParameterTypeDescription
endDatestringWindow end (YYYY-MM-DD). Defaults to today.
limitintegerMax events to return (default 50, max 200).
startDatestringWindow start (YYYY-MM-DD). Defaults to 90 days before endDate.
storestringOptional. Filter to a specific store (short or full domain). Omit for all stores the caller can see.

save_store_note Save a store note

Save a store-context note that future sessions — the user's AND their teammates' — should know. Notes are the workspace's SHARED memory: teammates' AI sessions read the same data but never see this chat, so anything not saved here stays with this one conversation. Call it when (1) the user reveals business context the data alone wouldn't show (e.g. 'one B2B customer is a reseller', 'Q2 budget is fixed', 'migrated platforms in March'); (2) the user AGREES a reporting definition or rule with you during analysis (e.g. 'turnover = Shopify Total sales after discounts and returns, incl. VAT and…

ParameterTypeDescription
category *stringdata_quirk = metrics are misleading; business_context = how to interpret the store's profile; strategic_constraint = don't recommend X; historical_event = pre-date data partial; excluded_segment = fil…
store *stringWhich store this note applies to (short form 'acme-store-eu' or full 'acme-store-eu.myshopify.com'), or 'all' for every store in the workspace.
text *stringConcise framing for future LLM sessions. Include the WHY when relevant. 1–3 sentences, 800 characters max. Near-duplicates of an active note are rejected. Use the user's verbatim wording where helpf…
severitystringinfo (default) = apply silently; warning = mention when relevant. Use warning when ignoring the note would mislead the merchant.

retire_store_note Retire a store note

Retire a store note that is OUT OF DATE or WRONG, so it stops reaching every AI session on this workspace (yours and teammates'). Retiring is reversible: the note is kept with who/when/why and the merchant can restore it from the dashboard. ONLY call this when the user says a note is no longer true or wrong, or when they agree to replace several notes with one consolidated note you've just saved. NEVER retire a note on your own judgement, and never because it seems irrelevant to the current question — it may matter to a teammate's work. Confirm to the user what you retired.

ParameterTypeDescription
noteId *stringThe note's 8-character `noteId`, as shown in _storeNotes and get_store_notes.
reason *stringWhy it's retired, in the user's terms (e.g. 'User says the Q2 budget freeze ended in July'). Shown on the dashboard.
store *stringStore the note belongs to (short or full domain), or 'all' to retire every copy of a note that was saved with store:'all'.

get_store_profile Store profile

Return what the system understands about a store's IDENTITY — primaryCategory, priceTier, audience, positioning, giftLed (is it typically bought as a gift for others?), the revenue-weighted category mix, and price range. System-generated from the catalog + sales (refreshed ~monthly), with any merchant corrections applied on top. Use as a session opener to orient yourself before answering, or when the user asks 'what do you know about my store?'. Treat `_merchantCorrected` fields as authoritative. If the profile is wrong, call update_store_profile. Omit `store` to get every store in the works…

ParameterTypeDescription
storestringOptional. Specific store (short or full domain). Omit for all stores in the workspace.

update_store_profile Update the store profile

Correct a store's profile when the USER tells you it's wrong (e.g. 'we're actually a premium brand', 'people DO buy our products as gifts at Christmas', 'we're skincare not cosmetics'). Corrections are authoritative: they override the system's guess immediately AND survive the monthly auto-regeneration. ONLY call this from something the user stated about their own store — never from your own inference. `giftLed` especially matters: it controls whether retail gift-holidays are treated as relevant for this store. Confirm to the user once saved.

ParameterTypeDescription
store *stringWhich store to correct (short or full domain). Required.
audiencestringWho the customer is.
brandTermsarrayCanonical brand terms (e.g. ['wills vegan','willsveganstore']) used to classify branded vs non-branded queries in get_connector_data(connector:'google-search-console', report:'branded_split'). Pin the…
giftLedbooleanTrue if products are typically bought as gifts for others; false for considered/self-purchase goods. Controls retail-calendar gift-event relevance.
notestringFree-text authoritative context to remember and feed into future profile regenerations.
positioningstringHow the store competes (e.g. ethical, budget, specialist).
priceTierstringRelative price positioning.
primaryCategorystringCoarse category, e.g. 'Footwear', 'Skincare'.

save_wakeup Schedule a follow-up analysis

Create or update a scheduled wakeup. **Create mode** (no `id`): schedule a future analysis with context and a metric snapshot. Call when the merchant asks to check back later, OR proactively before a retail event or trend worth monitoring. At save time pull the relevant metrics and write `context` as instructions for your future self. Returns `{ id }` — save that id to link the Claude routine. **Update mode** (with `id`): patch an existing wakeup — use this to link a Claude routine ID after creating it: `save_wakeup({ id: 'abc', routineId: 'trig_...' })`. The two systems work together: you…

ParameterTypeDescription
benchmarksobjectCurrent metric snapshot for before/after comparison. Be selective — only capture what's relevant to this check.
contextstringWhat to analyse when this fires and why it matters — instructions for your future self. Required on create.
idstringWakeup UUID. Omit to create; provide to update an existing wakeup (e.g. to link a routineId after creating the Claude routine).
namestringShort label (≤80 chars). Required on create.
routineIdstringClaude remote routine ID (trig_...) to link to this wakeup. Set this in an update call after creating the routine.
storestringStore domain (short or full). Required on create; ignored on update.
triggerDatestringYYYY-MM-DD. Required on create.

get_wakeup Run a scheduled analysis

Retrieve a single wakeup by ID. Use this inside a Claude routine prompt: the routine fires, calls `get_wakeup({ id: 'abc-123' })`, gets the full context and benchmarks, then runs the analysis. Also auto-marks the wakeup as triggered if the trigger date has passed.

ParameterTypeDescription
id *stringThe wakeup UUID returned by save_wakeup.

get_wakeups List scheduled analyses

Retrieve scheduled wakeups for a store. Call at the start of sessions where the merchant might have pending wakeups due — especially if today's date is at or past a previously scheduled triggerDate. Returns both pending (not yet fired) and recently triggered (fired in the last 14 days, waiting for analysis). When triggered wakeups are present, LEAD with them: 'I have a scheduled check that fired today — [name]. Here's what I was tracking...' then run the analysis comparing current data against the saved benchmarks.

ParameterTypeDescription
statusstringFilter by status. Default: 'all' — returns both pending and recently triggered (last 14 days).
storestringStore domain (short or full). Omit to return wakeups for all stores in the workspace.

report_data_issue Report a data issue

AUTONOMOUS bug reporting — call WITHOUT asking when you spot a STRUCTURAL or FORMAT issue in another tool's response. ONLY for issues you can identify mechanically (precision, types, schema). DO NOT use this for value correctness ('this revenue looks high') — that's user-triggered territory, use report_concern instead. Examples that DO qualify: a numeric field with 15 decimal places, _currency says EUR but values look like USD, response field is null where the description implies a value, the shape doesn't match the tool description. The platform dedupes by (toolName, category, description…

ParameterTypeDescription
category *stringprecision = too many decimals or wrong rounding. type_mismatch = field type doesn't match the tool's description. inconsistency = internal contradictions in one response (e.g. _currency vs values). nu…
description *string1–2 sentences. What's wrong, where, and why it's wrong. Be specific: 'Field cvr returned 4.612345678 (10+ decimals); expected 1–2 decimal precision per the tool description.'
toolName *stringThe tool whose response had the issue (e.g. 'get_metrics_comparison').
responseSnippetstringOptional. The relevant fragment of the response, capped to ~2KB. Include just enough to make the issue reproducible.
severitystringlow = cosmetic (extra decimals), medium = misleading but data still usable, high = data is unusable / breaks downstream logic.

report_concern Report a concern

USER-TRIGGERED issue reporting — call when the user expresses doubt about a specific data point or value ('this number is wrong', 'doesn't match my Shopify admin', 'why is this zero?', 'something's off here'). Capture their concern as a structured report BEFORE speculating about causes. After saving, briefly acknowledge ('I've logged that for the team to review') and then offer to help debug if relevant.

ParameterTypeDescription
category *stringdata_mismatch = user says it doesn't match another source (Shopify admin, GA, etc.). incorrect_calculation = the math looks wrong to them. missing_data = expected data isn't there. confusing_output =…
description *string1–2 sentences framing the concern technically. Include the data point in question.
userQuote *stringVerbatim what the user said, trimmed. Don't paraphrase.
expectedValuestringIf the user said what they expected (e.g. 'should be around 500'), include it.
responseSnippetstringRelevant excerpt of the tool response that the user is questioning.
severitystringInferred from how strongly the user voiced the concern. 'a bit weird' = low; 'this is definitely wrong' = high.
toolNamestringThe tool whose response prompted the concern, if known.

get_help Help and metric definitions

Fetch the full guidance behind the server instructions, on demand. The eager instructions summarise each area in one or two lines and point here for detail — call this only when you actually need the depth (you usually won't). Topics: routing (the canonical source-of-truth map — which tool owns each metric), signals (how to read _freshness / _confidence / _anomalies / _benchmark / _dataDepth / _recentDayCaveat / _alerts / _storeNotes), conventions (money / dates / timezone / abbreviations), claims (handling numbers the user quotes), analysis (median-vs-mean, hypotheses-not-causation, parti…

ParameterTypeDescription
topicstringA guide topic (routing, signals, conventions, claims, analysis, multistore, writeback, triple_whale), a metric name (ltv, order_counts, aov, cvr, cac, repeat_rate, roas, mer, nps, csat, refund_rate),…

get_briefing Session briefing

START HERE at the beginning of a session — call it FIRST and SILENTLY (don't announce the call, narrate your plan, or reference your instructions; just open with what it surfaces). One call that orients you before answering: the stores and their currencies, any data sources broken RIGHT NOW (numbers are unreliable until reconnected), open fix-work (interventions due for a verdict / in flight / recently closed), the current focus-plan headline, what each store IS (category / price tier / gift-led — so you frame things correctly), the top recent anomalies (with a `driverSummary` naming what…

ParameterTypeDescription
sinceDaysintegerWindow for the 'what changed' digest (default 7, max 90). A true 'since your last visit' view is coming; for now this is a rolling window.

get_focus Weekly focus plan

Return the merchant's current weekly plan — the committed 'what to work on now' list. Use as a session opener. The plan stays current until the merchant re-plans (say 'plan my week' / refresh: true) — it does NOT auto-expire, so re-asks return the same plan with each item's LIVE state (a 'tackle' item shows done once its finding is addressed; a 'check' item once its intervention closes). If no plan exists or refresh is requested, returns a synthesis bundle — open findings, interventions due for check-in, the outcomes summary, metric trends, AND the previous plan's unfinished items to car…

ParameterTypeDescription
refreshbooleanRe-plan from current data ('plan my week'). Supersedes the current plan and returns a fresh synthesis bundle. Default: false (returns the current plan).
topintegerTarget number of focus items (default 5, max 10). Affects the instruction sent to the model when refresh is needed.

save_focus Save the focus plan

Persist the week's committed plan generated from the get_focus data bundle. The plan blends THREE streams: 'tackle' (new open findings to act on, link insightId), 'check' (interventions due for their verdict, link interventionId), and 'watch' (a metric/anomaly to keep an eye on, set metric). Each item needs title, rationale (why now, citing data), action, expectedImpact, effort, priority. Item completion is DERIVED — a 'tackle' is done when its finding becomes addressed, a 'check' when its intervention closes — so always link insightId/interventionId when the item maps to one. Carry forwar…

ParameterTypeDescription
items *arrayOrdered focus items, top priority first
contextobjectOptional snapshot of inputs used (e.g. {openInsights: 12, lastOutcomesWinRate: 60}). Stored verbatim for auditability.
replacePreviousbooleanDefault true — supersede the previous plan. Set false to keep history visible.

update_focus_item Update a focus plan item

Set the manual state of a single item in the current focus plan: 'in_progress' (started), 'dropped' (decided not to do it this week), or 'planned' (clear the overlay). NOTE: you can NOT set an item to 'done' here — completion is DERIVED from the linked finding becoming addressed or the intervention closing. To complete a 'tackle' item, ship the fix and call set_intervention (which addresses the finding); to complete a 'check' item, call complete_intervention. Get itemIds from get_focus.

ParameterTypeDescription
itemId *stringThe focus item's id (from get_focus items[].id).
state *stringin_progress = started; dropped = retired for this week (kept for the record, excluded from progress); planned = clear the manual overlay.