Skip to main content
Glama

shopify_analytics_query

Read-onlyIdempotent

Retrieve account-bound Shopify analytics metrics like conversion rate and average order value for a specified UTC day range without writing custom ShopifyQL.

Instructions

Read one fixed, account-bound Shopify analytics observation. The host constructs server-owned ShopifyQL for the requested metric and exact UTC-day window; callers cannot submit arbitrary ShopifyQL.

Args:
    target_metric (required): One of conversion_rate, storefront_conversion_rate, add_to_cart_rate, checkout_completion_rate, or average_order_value.
    window_start (required): Inclusive canonical UTC-midnight instant, for example 2026-08-01T00:00:00Z.
    window_end (required): Exclusive canonical UTC-midnight instant, 1-366 whole days after window_start.
    currency: Required uppercase ISO currency only for average_order_value.
    project_id: Authenticated Project UUID.
    project_ref: Exact project correlation reference.
    connector_account_ref: Project-bound connector account alias.
    idempotency_key: Stable business-action identity.
    effect: Required and must be read; Spring verifies it.
    approval_ref: Approved platform task UUID when resuming a write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
effectYes
currencyNo
project_idNo
window_endNo
project_refNo
approval_refNo
window_startNo
target_metricNo
idempotency_keyNo
connector_account_refNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.1.1
    • addedInput schema / properties / approval_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Approval Ref"
      +}
    • addedInput schema / properties / connector_account_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Connector Account Ref"
      +}
    • addedInput schema / properties / currency
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Currency"
      +}
    • addedInput schema / properties / effect
      Added value: +{
      +  "const": "read",
      +  "title": "Effect",
      +  "type": "string"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Idempotency Key"
      +}
    • addedInput schema / properties / project_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Id"
      +}
    • addedInput schema / properties / project_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Ref"
      +}
    • removedInput schema / properties / query
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Query"
      -}
    • addedInput schema / properties / target_metric
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Target Metric"
      +}
    • addedInput schema / properties / window_end
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Window End"
      +}
    • addedInput schema / properties / window_start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Window Start"
      +}
    • addedInput schema / required
      Added value: +[
      +  "effect"
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description states the query is host-constructed and server-owned, account-bound, and restricted to a closed set of metrics and exact UTC windows. This adds meaningful behavioral context, though the mention of approval_ref 'when resuming a write' is slightly confusing for a read-only tool.

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 summary line is front-loaded and the Args block is compact and well organized, with each parameter on its own line. The approval_ref 'when resuming a write' note is arguably unnecessary and adds minor confusion, so it is not perfectly concise.

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 10-parameter tool with no schema descriptions and no enum constraints, the description fills in almost all invocation-relevant details, including supported metric values, date-window semantics, and the account/effect constraints. The main gap is the unresolved required/optional mismatch between the description and schema, which could make an agent hesitate about what to supply.

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?

With 0% schema description coverage, the description carries the full parameter burden and largely succeeds: it documents all 10 parameters, enumerates target_metric values, defines window_start/window_end inclusivity and range, and notes currency is only relevant for average_order_value. It loses a point because several args (project_ref, connector_account_ref, idempotency_key, approval_ref) remain abstract, and the 'required' labels conflict with the schema's actual required list.

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 opening sentence names a concrete resource and action: 'Read one fixed, account-bound Shopify analytics observation.' It further disambiguates by enumerating the five supported metrics and stating that callers cannot submit arbitrary ShopifyQL, so an agent knows precisely what this tool does and how it differs from a general analytics/query tool.

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 description gives clear selection context: use this tool when you need a read-only Shopify analytics observation for an explicitly supported metric over an exact UTC-day window. It also sets an exclusion ('callers cannot submit arbitrary ShopifyQL'), though it does not name a specific alternative tool for arbitrary queries.

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

Deploy Server

Other Tools