Skip to main content
Glama
barlasarda91

Shopify MCP Server

by barlasarda91

create-discount-code

Generate a discount code that customers can enter at checkout, choosing either a percentage or fixed amount off the entire order. Set start and end times, and optionally limit use to one per customer.

Instructions

Create a basic discount code (percentage or fixed amount off the whole order) that customers can enter at checkout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code customers enter at checkout, e.g. 'SUMMER20'
titleYesInternal title for the discount, shown in the Shopify admin
valueYesDiscount value: for percentage use 20 for 20%; for fixed_amount use the amount in store currency
endsAtNoOptional ISO 8601 end time
startsAtNoISO 8601 start time; defaults to now
valueTypeYesWhether the discount is a percentage or a fixed amount off
appliesOncePerCustomerNoLimit the code to one use per customer

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It does state the outcome (a discount code customers can enter at checkout) and the discount type/scope, but it omits side effects such as admin visibility, activation timing based on startsAt, duplication behavior, or what happens after creation.

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?

One tight, front-loaded sentence with no filler. Every clause adds relevant context: the action, the discount type, the scope, and how the code is used.

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?

The description is adequate for selecting the tool and understanding its core effect, but with no annotations and no output schema it leaves gaps: no indication of the response/return value, no prerequisites, and no warnings about duplicate or conflicting codes. For a 7-parameter mutation, this is a minimal but not fully complete description.

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 schema already documents all seven parameters and defaults. The description adds no parameter-level details beyond the 'percentage or fixed amount' distinction, which is already expressed by the valueType enum.

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 description opens with a specific verb-resource pair ('Create a basic discount code') and immediately defines the scope: percentage or fixed amount off the whole order, entered at checkout. This clearly differentiates from sibling tools like update-product or adjust-inventory.

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?

The word 'basic' implies this tool is for simple, order-level discounts, but it never explicitly states when to use it versus alternative discount-creation flows or when not to use it. No exclusions or alternative tools are mentioned, leaving usage context to be inferred.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/barlasarda91/Shopify-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server