Skip to main content
Glama

shopify_analytics_query

Run ShopifyQL analytics queries to retrieve revenue, AOV, sessions, and conversion metrics from your Shopify data. Default query provides net_sales and order_count by day for last 30 days.

Instructions

Run a ShopifyQL analytics query against the shop's analytics warehouse. Use for revenue, AOV, sessions, conversion, and grouped time-series metrics. Defaults to net_sales + order_count by day for the last 30d when query is omitted.

Args:
    query: ShopifyQL statement. Example: 'FROM sales SHOW sum(net_sales), count(orders) SINCE -14d UNTIL today GROUP BY week'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description carries full burden. Describes default behavior and provides example query syntax, but does not explicitly state whether the operation is read-only or disclose potential side effects, rate limits, or data volume considerations.

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?

Four concise sentences: introduction, use cases, default behavior, and parameter explanation. Front-loaded with purpose, no redundancy, every sentence adds value.

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?

For a single-optional-parameter tool with an output schema, the description covers purpose, parameter, and default behavior completely. No gaps in essential information.

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?

Input schema has no description for the 'query' parameter (0% coverage). The description fully compensates by explaining the parameter as 'ShopifyQL statement' with a concrete example, adding essential meaning beyond the raw schema.

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 'Run a ShopifyQL analytics query against the shop's analytics warehouse' – a specific verb+resource. Lists use cases (revenue, AOV, etc.) that distinguish it from sibling Shopify tools like shopify_get_shop_info or shopify_list_abandoned_checkouts.

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?

Provides explicit when-to-use guidance: 'Use for revenue, AOV, sessions, conversion, and grouped time-series metrics.' Also explains default behavior (net_sales + order_count by day for last 30d) when query omitted. Does not list alternatives or when-not-to-use, but context makes differentiation clear.

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/RPasquale/lightbulb-mcp'

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