Skip to main content
Glama
den-indance

Shopify MCP Pro

runShopifyQL

Run custom ShopifyQL analytics queries to fetch sales, sessions, and more from your Shopify store. Specify metrics, dimensions, filters, and grouping to generate reports.

Instructions

Run an arbitrary ShopifyQL analytics query against the store. Same data as Admin → Analytics. Canonical clause order: FROM → SHOW → WHERE → SINCE/UNTIL/DURING → GROUP BY → ORDER BY → LIMIT. Dates are BARE (no quotes): SINCE 2026-01-01 UNTIL today or relative SINCE -30d UNTIL today. Use GROUP BY (full keyword), not BY. Dimensions in SHOW must also appear in GROUP BY. Verified datasets: sales (metrics: total_sales, gross_sales, net_sales, orders, average_order_value; dims: product_title, billing_country, customer_type), sessions (metrics: sessions, online_store_visitors, conversion_rate; dims: referrer_source, utm_source, utm_medium, referrer_host). Note: orders and products are NOT valid ShopifyQL datasets — use GraphQL tools instead. Returns { parseErrors: [String], tableData: { columns: [{name,dataType,displayName}], rows: JSON } }. parseErrors is non-empty when the query is syntactically/semantically invalid — read it for the exact field/dataset name issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesRaw ShopifyQL query string
Behavior5/5

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

With no annotations, the description fully discloses behavior: it's a read-only query (same as Admin analytics), describes return format (parseErrors and tableData), and explains error handling (parseErrors non-empty on syntax/semantic issues). No contradictions.

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?

The description is detailed but every sentence adds value. It is front-loaded with purpose and follows with organized guidance. Could be slightly more concise by grouping related info, but overall efficient for the complexity.

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

Completeness5/5

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

Given the tool's complexity (one parameter with extensive implicit knowledge) and no output schema, the description covers syntax, datasets, error handling, and return format comprehensively. It leaves no major gaps for an agent to invoke correctly.

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

Parameters5/5

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

The single 'query' parameter's schema merely says 'Raw ShopifyQL query string', but the description adds extensive semantics: syntax rules, datasets, metrics/dimensions, date formats, and error details. This far exceeds the schema's minimal description.

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?

Clearly states it runs arbitrary ShopifyQL analytics queries against the store, differentiating from sibling report tools like getSalesReport and getTrafficReport. Explicitly mentions 'Same data as Admin → Analytics' to establish context.

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?

Provides comprehensive guidance: canonical clause order, date syntax (bare and relative), keyword usage ('GROUP BY' vs 'BY'), dimension/metric constraints, verified datasets with examples, and explicit exclusions ('orders' and 'products' are NOT valid, use GraphQL tools).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/den-indance/shopify-mcp-pro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server