Skip to main content
Glama
Shopify Analytics MCP Server

Shopify Analytics MCP Server

by DrMatrixx

run_shopifyql

Run custom ShopifyQL queries to retrieve analytics not covered by standard tools, enabling tailored sales, order, and performance reporting.

Instructions

Run a raw ShopifyQL query for custom analytics not covered by other tools. Example: FROM sales SHOW total_sales, orders TIMESERIES day SINCE -7d

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "run_shopifyql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesRaw ShopifyQL query string

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description bears the full behavioral burden. It usefully frames the tool as an escape hatch for custom analytics, but says nothing about read-only semantics, query limits or timeouts, error behavior for malformed ShopifyQL, or result shape; the example is the only concrete behavioral signal.

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

Conciseness5/5

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

Two sentences, purpose first and illustrative example second, with no filler. Every clause contributes either the use case or the syntax demonstration.

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?

For a one-parameter passthrough tool with no output schema, the description covers what it does and how to phrase input, which is most of what an agent needs. The remaining gap is that with no output schema the agent has no idea what the returned rows or fields look like before firing a query.

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?

Single parameter with 100% schema description coverage sets the baseline at 3, and the description exceeds it by embedding a working query example ('FROM sales SHOW total_sales, orders TIMESERIES day SINCE -7d') that demonstrates the grammar and clause ordering the schema's 'Raw ShopifyQL query string' does not convey.

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 ('Run') and resource ('a raw ShopifyQL query') and immediately bounds the scope to 'custom analytics not covered by other tools', which separates it from the prebuilt report siblings like get_sales_summary or get_top_products. The inline example query removes any ambiguity about what 'raw' means.

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

Usage Guidelines4/5

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

The phrase 'not covered by other tools' gives a clear selection rule: reach for this only when a purpose-built analytics tool cannot answer the question. It stops short of naming alternatives or stating exclusions such as 'do not use for standard sales summaries', so the agent must infer the fallback ordering from the sibling list.

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