Skip to main content
Glama

run_shopifyql_query

Run ShopifyQL queries to analyze store data, retrieving metrics like sales or product performance over custom time periods. Returns results as a formatted ASCII table or raw JSON for easy integration.

Instructions

Run a ShopifyQL query against the store and return the result as a rendered ASCII table. ShopifyQL is Shopify's SQL-like analytics language. Examples: 'FROM sales SHOW total_sales BY day SINCE -30d TIMESERIES', 'FROM products SHOW product_title, quantity_sold BY product_id SINCE -7d ORDER BY quantity_sold DESC LIMIT 10'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesShopifyQL query string. Example: 'FROM sales SHOW total_sales, gross_sales BY day SINCE -30d TIMESERIES'
rawNoReturn the raw unformatted JSON payload instead of a rendered table.
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It states the tool runs a query and returns results, but does not explicitly indicate it is read-only, nor does it mention any side effects, rate limits, or error handling. The description is adequate but could be more transparent.

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?

The description is concise: three sentences that first state the purpose, then define the query language, and finally give examples. All sentences are informative, and the key information is front-loaded.

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?

Given the tool's moderate complexity and absence of output schema, the description covers the return format (ASCII table or raw JSON) and provides examples. It could mention query limitations or timeouts, but overall it is sufficiently complete for an AI agent.

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?

The input schema has 100% description coverage for both parameters. The description adds value by providing concrete example queries that illustrate usage, going beyond the schema's basic descriptions. This compensates for the lack of deeper parameter semantics.

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?

The description clearly states the tool runs a ShopifyQL query and returns results as an ASCII table. It also defines ShopifyQL and provides examples, making the purpose unambiguous. The tool is distinct from sibling CRUD tools, so differentiation is clear.

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

Usage Guidelines3/5

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

The description provides examples indicating use for analytics queries, but lacks explicit guidance on when to use this tool versus alternatives. It does not mention when not to use it (e.g., for CRUD operations), leaving some ambiguity.

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/miller-joe/shopify-mcp'

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