Skip to main content
Glama
Shopify MCP Server

Shopify MCP Server

by morsimohsen

list_discounts

Retrieve discount codes from a Shopify store to review promotions, with search filtering and cursor-based pagination for browsing large discount lists.

Instructions

List discount codes from the Shopify store

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": "list_discounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoCursor for pagination
firstNoNumber of discounts to return (1-250, default: 50)
queryNoSearch query to filter discounts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it only restates the name. It says nothing about pagination behavior, result volume limits, read-only nature, required scopes, or what a discount record contains, all of which matter for a listing 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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity is also the source of the missing guidance rather than a deliberate tradeoff.

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 read-only list tool with fully documented parameters and no output schema, the description is minimally adequate. It still leaves an agent guessing about result shape, whether pagination must be driven manually, and whether the search query matches code strings or price-rule titles.

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 the cursor, page-size range (1-250, default 50), and search-query parameters are fully documented in the schema already. The description adds no meaning beyond that, which is the baseline expectation when the schema does the work.

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 and resource ("List discount codes") plus the store scope, which is unambiguous. It does not distinguish itself from any sibling, though none of the listed siblings appear to overlap on discounts other than create_discount_code/delete_discount, so the risk of confusion is low.

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?

The description gives no when-to-use guidance, no prerequisites, and never mentions alternatives or exclusions. The only implied context is that it reads discounts from "the Shopify store," which an agent could already infer from the name.

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