Skip to main content
Glama

Create promocode product

shop_create_promocode_product

Create a promocode based on dedicated product to be applied before order payment. Guidance: Create a promocode based on dedicated product 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 applied 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).
product_idYesId of product from which the discount can be applied
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
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

C2.9/5.0
Behavior3/5

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

Annotations already indicate readOnlyHint=false (write operation), openWorldHint=true, idempotentHint=false, destructiveHint=false. The description adds a single behavioral detail: the promocode is applied before order payment. This is useful but minimal; it does not describe side effects, error conditions, or what happens to existing promocodes. Given the annotations cover the core safety profile, a 3 is appropriate.

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

Conciseness3/5

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

The description is extremely short, which is good for conciseness, but it repeats the same sentence twice ('Create a promocode...' and then 'Guidance: Create a promocode...'). This is redundant and wastes a sentence. The information is front-loaded, but the repetition detracts from clarity.

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

Completeness2/5

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

With 17 parameters, 5 required, and no output schema, the description is far too thin. It does not explain the relationships between parameters (e.g., how conditions, min_price, max_price, product_id, and discount_type work together), nor does it provide any example or edge-case handling. An agent would struggle to correctly construct a valid call based on this description alone.

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 with detailed descriptions, so the baseline is 3. The description mentions 'name, discount_type, value' as context, but this adds no meaning beyond what the schema already provides. It does not explain how these parameters interact with the product_id or other 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 states a clear action (create) and resource (promocode based on product), and the 'based on dedicated product' phrasing differentiates it from sibling promocode creators (amount, collections, tags). However, it does not elaborate on what 'dedicated product' means or how this differs functionally from the other promocode tools beyond the name.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention when to choose a product-based promocode over amount, collections, or tags-based promocodes, nor does it give any context about prerequisites or typical scenarios.

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.