Skip to main content
Glama

Create promocode collections

shop_create_promocode_collections

Create a promocode based on dedicated collections to be applied before order payment. Guidance: Create a promocode based on dedicated collections to be applied before order payment. | context: name, discount_type, value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoCode to use during checkout to apply discount If not, provided, it will be generated automatically with following formatXXXX-XXXX-XXXX
nameYesName of code to use during checkout to apply discount
valueYesValue of the discount to apply during the checkout
end_atNoDatetime **until which** the code should be applied
end_dateNoAlias for end_at. Set to 'none' for no expiration.
max_usesNoNumber of max uses of the code
start_atYesDatetime **from which** the code should be applied
max_priceNoIf 'conditions' set to 'PRICE_RANGE', code can be applied order price is lower than this value
min_priceNoIf 'conditions' set to 'PRICE_RANGE', code can be applied order price is greater than this value
conditionsNoCondition based on order details: - **NONE**: Code can be applied for any order conditions. - **PRICE_RANGE**: Code can be applied for order price conditions (check 'min_price' and 'max_price' fields). - **NUMBER_OF_PRODUCTS**: Code can be applied for order quantity conditions (check 'min_quantity' fields).
min_quantityNoIf 'conditions' set to 'NUMBER_OF_PRODUCTS', code can be applied order quantity is greater than this value
discount_typeYesType of discount you want to apply - **AMOUNT**: discount will be applied in the absolute value of the order. - **PERCENT**: discount will be applied in the relative value of the order
collection_idsYesIds of collection from which the discount can be applied
one_use_by_userNoIf set to true, code can be applied once by customer or prospect.
registered_onlyNoIf set to true, code can be applied only for registered user with your ecommerce.
specific_registered_idsNoList of ids of customers and leads who can applied code in case of specific_registered_only is set to True
specific_registered_onlyNoIf set to true, code can be applied only for customers and prospect who have an account with your ecommerce.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The description communicates the primary side effect ('Create') and adds business context about applying discounts before order payment. The annotations already cover readOnly, destructive, and idempotent hints, so the description does not need to repeat those; no contradictions are present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a clear purpose, but it immediately repeats the same sentence under a 'Guidance:' prefix and includes a stray 'context:' metadata fragment. This duplication and clutter reduce conciseness without adding information.

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 parameter schema is rich and covers all inputs, and the description gives enough context to understand the tool's role. However, there is no mention of what the response contains or what success/error behavior looks like, and no output schema is provided to compensate.

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 schema covers 100% of parameters, and the descriptions add useful conditional logic (e.g., 'conditions' and 'min_price'/'max_price'), auto-generation behavior for 'code', and an alias for 'end_date'. However, the 'discount_type' description mentions 'AMOUNT' while the enum value is 'ABSOLUTE', creating a potential inconsistency that reduces clarity.

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 clearly states the specific action ('Create a promocode') and the target resource ('based on dedicated collections'). It is further distinguished from sibling tools by the phrase 'based on dedicated collections', which aligns with the tool name.

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

Usage Guidelines4/5

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

The description indicates this tool is for creating promocodes tied to collections, which provides clear context for when to use it. It does not explicitly enumerate alternative tools, but the collection-based scope is specific enough to guide selection among the promocode-creation variants.

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.