Skip to main content
Glama
A1-x-Tech

mcp-shopify-admin

Создать промокод

create_basic_discount

Create a basic Shopify promo code discount with percentage or fixed amount, valid for all customers and products. Set start/end times, usage limits, and per-customer limits.

Instructions

Создаёт базовую промокодную скидку: один код, процент (percentage, доля 0..1: 0.2 = −20%) ИЛИ фиксированная сумма (amount в валюте магазина) — ровно одно из двух, для всех клиентов на все товары. startsAt по умолчанию — сейчас, то есть код начинает действовать немедленно; отложенный запуск задаётся явным startsAt. usageLimit — общий лимит применений, appliesOncePerCustomer — не больше раза на клиента. Скидки на отдельные коллекции/сегменты, BXGY и бесплатная доставка здесь не создаются (graphql_request), выключение скидки — тоже. Повторный вызов с тем же кодом провалится userErrors: код должен быть уникален.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesПромокод, который вводит покупатель, например BLACKFRIDAY. Уникален в магазине.
titleYesВнутреннее название скидки (видно в админке).
amountNoФиксированная сумма скидки в валюте магазина, например "500.00".
endsAtNoКонец действия, ISO-8601. Без него скидка бессрочная.
startsAtNoНачало действия, ISO-8601. По умолчанию — немедленно.
percentageNoДоля скидки 0..1 (0.2 = −20%). Ровно одно из percentage/amount.
usageLimitNoОбщий лимит применений кода.
appliesOncePerCustomerNoНе больше одного применения на клиента.
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false, openWorldHint=true), the description discloses meaningful behavioral traits: startsAt defaults to now so the code activates immediately, a repeat call with the same code fails via userErrors because codes must be unique, and only one of percentage/amount is accepted. These failure modes and default behaviors are exactly what an agent needs to anticipate outcomes. The description is consistent with the annotations — no contradiction.

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?

Four dense sentences with a logical progression: what is created and its constraints, default timing, limit semantics, then boundaries and failure mode. Every sentence earns its place and the core purpose is front-loaded. It is on the longer side, and the usageLimit/appliesOncePerCustomer sentence partially duplicates the schema descriptions, but there is no filler or repetition.

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?

For an 8-parameter mutation tool with no output schema, the description covers the essential operational context: scope, exclusivity constraint, default behavior, failure mode (userErrors on duplicate code), and scope boundaries. The main gap is that it does not describe the success return value or shape; however, the userErrors mention hints at the response contract, and the failure disclosure is the more critical information for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by elevating the mutual-exclusivity constraint between percentage and amount to a top-level rule, giving a concrete interpretation example (0.2 = −20%), and clarifying that an omitted startsAt means immediate activation. The mentions of usageLimit and appliesOncePerCustomer largely paraphrase the schema, but the exclusivity and timing semantics are genuine additions.

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 — 'Создаёт базовую промокодную скидку' (creates a basic promo-code discount) — and then precisely defines the boundaries of 'basic': one code, all customers, all products, with exactly one of percentage/amount. It distinguishes itself from the sibling graphql_request by explicitly listing what this tool does NOT create (collection/segment discounts, BXGY, free shipping, disabling discounts), so an agent can disambiguate without inspecting other 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?

The description explicitly states when not to use this tool and names the alternative: discounts on individual collections/segments, BXGY, free shipping, and disabling a discount are not created here — for those, use graphql_request. It also states the hard usage rule 'ровно одно из двух' (exactly one of percentage/amount) and the uniqueness constraint, leaving no ambiguity about preconditions or routing.

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

Install Server

Other Tools

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/A1-x-Tech/mcp-shopify-admin'

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