Skip to main content
Glama

get_product_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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results (default: 20)
reportYesReport type
sortByNoFor top_products: sort field (default: revenue)
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.
endDateNoEnd 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).
productIdNoFor product_detail: Shopify product ID
startDateNoStart date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does real work: it discloses a plan-tier requirement and a consequential upstream schema change that removes funnel fields, which an agent cannot infer from the schema. It leaves a few minor traits unstated (error behavior on non-Plus stores, result-size/rate behavior), but the critical operational caveats are covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core capability, then the prerequisite, then the deprecation note and alternatives, then the report catalog. Dense and every sentence carries information, though the mid-description NOTE and the trailing report list make it a long single block rather than crisply segmented.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description partially compensates by enumerating the three report types and what each returns, plus the alternatives for funnel data. Date defaults and pagination are already covered in the schema. What remains thin is the actual shape of returned records and how report selection interacts with productId/sortBy.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: it defines what each report enum value returns (summary = total units/revenue, top_products = ranked, product_detail = daily figures for one product). It also loosely describes sortBy sorting ('by revenue or units sold'), though the schema enum uses 'purchases' rather than 'units sold', a minor wording drift.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get Shopify product sales analytics — units sold and revenue per product') and even names the underlying source (ShopifyQL). It distinguishes itself from siblings by name, routing funnel questions to get_marketing_performance and get_analytics(ecommerce), so an agent can differentiate it from get_top_products and get_product_health without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the prerequisite (requires Shopify Plus or Advanced), states what this tool can no longer answer (views, add-to-cart, purchase funnel counts), and names the two alternative tools plus the condition that selects them. This is the when-to-use / when-not-to-use / alternatives pattern in full.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources