Skip to main content
Glama
Shopify Analytics MCP Server

Shopify Analytics MCP Server

by DrMatrixx

get_refunds_summary

Retrieve total refunds and refund rate for a date range, with optional product-level breakdown to analyze refund patterns.

Instructions

Get refund metrics — total refunds, refund rate, and optionally by product.

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_refunds_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoDate range (default: last_30d)
group_byNoGroup refunds by product (default: none)

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 carries the full load. It does reveal the shape of the output (total refunds, refund rate), which is genuinely useful, but it omits whether 'total refunds' is a count or a monetary amount, what currency/format the rate takes, and any permission or scoping behavior.

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?

A single front-loaded sentence with no filler and the metrics listed in priority order. It is efficient, though its brevity is partly a symptom of under-specification rather than disciplined density.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter read tool with no output schema, the description is minimally adequate but leaves key ambiguity about metric definitions (count vs amount, rate units) that only a fuller description could resolve.

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%, so both parameters are already documented, including the period default and the group_by enum. The description only echoes the 'by product' option and adds no syntax or semantic detail beyond the schema, making the baseline 3 appropriate.

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?

The description uses a specific verb and resource ('Get refund metrics') and enumerates the metrics returned: total refunds, refund rate, and optional product breakdown. The refund focus is distinct from the sales/customer-oriented siblings, though it never explicitly names an alternative to contrast against.

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?

Usage is only implied: an agent can infer this is for refund analysis, and 'optionally by product' hints at the grouping variant. There is no explicit when-to-use, when-not-to-use, or comparison to tools like get_sales_summary that may also surface refund data.

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