Skip to main content
Glama

Create Shopify discount code

create_shopify_discount_code
Destructive

Create a CODE discount in the connected Shopify store (percentage off, applies when a buyer enters the code — inert until the code is shared). Automatic discounts are deliberately not available here (they change every checkout unprompted and need approval). Use for building promotions the operator will distribute.

Routing: Shopify: create a percentage discount CODE (never automatic discounts)

[sensitive-tier — first use may require a manager's approval; a from-now-on approval makes future calls seamless, a just-once approval re-asks next time. Call it on the first clear ask; the card is the yes — do not re-ask in chat.]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code buyers type, e.g. WELCOME10 (letters/digits/dashes, 3-30 chars)
titleYesInternal discount title
ends_atNoOptional ISO end datetime; omit for no end
companyIdYesFreedomOS company id to act within (you must be a member). Required for company-scoped tools.
percentageYesPercent off, 1-100

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description adds meaningful behavioral context: the discount is inert until shared, automatic discounts change every checkout unprompted, and the tool is sensitive-tier with an approval nuance. There is no contradiction with the annotations; destructiveness is consistent with modifying the live Shopify store.

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?

The description is front-loaded with the core purpose and keeps the approval guidance in a separate bracketed block. It is somewhat verbose and repeats 'never automatic discounts' in both the first sentence and the routing line, but every sentence still contributes useful operational information.

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

Completeness5/5

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

For a create-style tool with fully documented parameters and no output schema, the description is complete enough: it covers what is created, when to use it, what not to use it for, the approval workflow, and the relevant schema is self-documenting. No essential calling information is missing.

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 coverage is 100%, so the schema already documents all five parameters. The description only restates the 'percentage off' and 'code' concepts at a high level and adds no parameter-level detail beyond the schema, so the baseline 3 applies.

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 states a specific verb and resource: create a CODE discount in the connected Shopify store, with percentage-off semantics. It explicitly contrasts with automatic discounts, which distinguishes it from any related Shopify discount tooling and from sibling create_shopify_* tools.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance ('building promotions the operator will distribute') and equally explicit when-not-to-use guidance ('never automatic discounts'). It also provides routing and approval-handling instructions, including not re-asking once the approval card is confirmed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources