Skip to main content
Glama
Shopify Analytics MCP Server

Shopify Analytics MCP Server

by DrMatrixx

get_discount_performance

Analyze discount code performance by revenue, orders, and discount amounts over a date range, with optional filtering for a specific code.

Instructions

Get performance of discount codes — revenue, orders, and discount amounts.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_discount_performance"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoDate range (default: last_30d)
discount_codeNoSpecific discount code to filter. If omitted, shows all codes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/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 burden. It helpfully discloses the returned metrics, but says nothing about aggregation level (per-code rows vs. a single total), time granularity, pagination, or any permission requirements for discount data.

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?

A single front-loaded sentence with the resource first and the returned metrics after the dash. No filler, no redundancy.

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 two-parameter, all-optional read tool with full schema coverage and no output schema, the description covers purpose and return content adequately. Only the aggregation granularity of the result is left unspecified.

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

Parameters3/5

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

Schema description coverage is 100%, including the default period ('last_30d') and the omit-to-see-all behavior for discount_code, so the baseline is 3. The description adds no format or syntax detail (e.g., accepted period values) beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Get') and resource ('performance of discount codes') and enumerates the metrics returned: revenue, orders, discount amounts. It is unambiguous and no sibling tool covers discount codes, though the description does not explicitly contrast itself with the sales/revenue siblings.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over get_sales_summary, get_order_trends, or run_shopifyql, and no exclusions or prerequisites are stated. Usage is only implied by the name and metric list.

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