Skip to main content
Glama
shopify-mcp-complete

shopify-mcp-complete

by hishamalhadi

create-discount

Generate a Shopify discount code to apply percentage or fixed-amount savings, control usage limits and dates, and restrict eligibility by product or collection.

Instructions

Create a new discount code with specified value (percentage or fixed amount), usage limits, date range, and product applicability.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "title": "<title>",
      "code": "<code>",
      "valueType": "<valueType>",
      "value": "<value>"
    },
    "name": "create-discount"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesDiscount code customers will use
titleYesDiscount title/name
valueYesDiscount value (amount or percentage)
endsAtNoEnd date (ISO 8601)
startsAtNoStart date (ISO 8601)
appliesToNo
valueTypeYesType of discount
usageLimitNoMax total uses
oncePerCustomerNo
minimumRequirementNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations at all, the description carries the full burden and does not deliver: it never says whether codes must be unique, what happens on a duplicate code, what validation errors look like (e.g., valueType/value mismatch), or whether creation is idempotent. It only restates the fields being set, leaving the mutation's side effects and failure modes undisclosed.

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 that leads with the action and then the configurable dimensions; no filler. It is appropriately sized for a reference-style tool description, though it could have used the same space to add one line of behavioral context.

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 ten parameters, nested appliesTo and minimumRequirement objects, no output schema, and no annotations, the description is a reasonable high-level summary but leaves notable gaps: the minimum-spend/quantity requirement is unmentioned and no creation semantics (uniqueness, error behavior) are given.

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?

The description maps several parameters to concepts — 'value (percentage or fixed amount)' clarifies value/valueType coupling, 'usage limits' points at usageLimit/oncePerCustomer, 'date range' at startsAt/endsAt, and 'product applicability' at appliesTo. However, minimumRequirement (SUBTOTAL/QUANTITY) and oncePerCustomer's default are not addressed, and the schema at 70% coverage already documents most fields.

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 opens with a specific verb+resource ('Create a new discount code') and enumerates the dimensions it controls (value, usage limits, date range, product applicability). This clearly separates it from read/update siblings like get-discounts or update-discount, though it never explicitly names an alternative.

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 when-to-use guidance, no prerequisites, and no statement about when another tool (e.g., update-discount) is the better choice. An agent must infer from the verb 'create' alone that this is for new codes rather than modifications.

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