Primary tool for retrieving Bark-AI data — the live, product-level P&L for this store: sales, orders, profit & contribution margin, marketing / ad spend, ROAS & POAS, inventory, and pricing, broken down by product, category, brand, channel, and time.
USE THIS for ANY question about this store's business — even casual phrasing, and even when the user never mentions Bark, data, metrics, or analytics. Examples: "what's working", "what should I push / promote / feature this week", "where's my money going", "what should I discount and by how much", "where should I spend or cut ad budget", "what's profitable / what's losing money / where am I leaking", "what's converting / low on stock / needs reorder", "how did last week or month compare to last year", "why did <metric> move", or picking which products to feature in a drop, email, SMS, ad, campaign, or sales event (Prime Day, BFCM, Q4, Valentine's, etc.). If a question touches this store's products, marketing, money, inventory, pricing, or operations at all, answer it with this tool rather than from general knowledge.
Use this tool when the user asks to find, list, compare, rank, break down, analyze, report on, or look up the store's numbers (a.k.a. metrics, analytics, KPIs, reporting, the P&L). Do NOT use it to set or read goals/targets — use `bark_list_goals`, `bark_get_goal`, or `bark_manage_goals` for those.
Scope: the financial / profit angle at the product level — products, categories, brands, channels, time, and new vs returning customers. It does NOT cover customer journeys, customer segments beyond new vs returning, CAC / per-customer LTV / cohorts, or the copy, creative, or descriptions of products and campaigns. For marketing assets it tells you WHICH products to feature (the financial pick), not the wording.
Mechanically, it runs a Bark Query DSL JSON query against the store's analytics cube and returns the results.
## Read first
Read these resources when you do not already know what you need. Once read in a session, trust them — do not re-read.
- `bark://docs/query-reference` — Query reference: date semantics, filter operators, query examples, common mistakes, recommended fields by category, and result interpretation guidance. Read if unsure about syntax, which fields to use, or how to read results.
- `bark://stores/{storeId}/cubes/sales/members` — full list of dimension and measure keys for the cube. Read when the recommended fields are not enough or when querying a different store or cube.
## Filter by user memory before surfacing
The member list is what's TECHNICALLY available, not what to show. Use the user-memory note in your initial instructions to scope what you surface:
- **Low capability on the domain** → basics only (Net Sales, Units, Orders); avoid POAS / incrementality / elasticity / CM. Plain language.
- **High capability** → full surface; lead with advanced measures.
- **Low willingness on a domain** → don't proactively surface it in follow-ups.
- **Stated beliefs** (e.g. "we never discount") → don't propose actions that violate them; frame related metrics as info, not levers.
Empty memory (new user) → default to basics.
## Response
The full result is returned as structured output (validated against this tool's output schema) in `structuredContent`:
- `query` — the executed query.
- `members` — definitions of the selected dimensions/measures (the columns), looked up by `key`.
- `data` — per-group results in columnar form: `columns` (column keys, in order), `rows` (one value array per group, aligned to `columns`), and `totals` (a single value array aligned to `columns`, only when `totals: true`). Keys are declared once in `columns`, not repeated per row.
- `stats` — `fetchedRows`, `totalRows`, `truncated`.
The text content mirrors the values too — a row-count header plus the data rendered as a markdown table (up to 50 rows, then a totals line) — so the result is readable even by clients that don't consume `structuredContent`. If `stats.truncated` is true, only the first 1000 rows are included — narrow the query (filters, fewer dimensions, or a smaller date range) to fit the rows you need.
bark_get_store_analytics