Skip to main content
Glama

discount_create

Create a new discount for your ecommerce store by specifying a code and optional parameters for amount, type, validity, and redemption limits.

Instructions

Create a discount (POST /admin/api/ecommerce/v1/discounts). Envelope {discount: {...}}. Required: code. Empirically-verified enum values (rejected client-side with a clear error before round-tripping to Voog): status ∈ {open, closed} amount_mode ∈ {net, gross} discount_type ∈ {fixed, percentage} applies_to ∈ {cart, cart_and_shipping, categories, products, shipping} Optional: name, description, amount, valid_from (ISO8601), valid_to, redemption_limit, stackable, currency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYes
codeYes
nameNo
descriptionNo
amountNo
amount_modeNo
discount_typeNo
statusNo
applies_toNo
valid_fromNo
valid_toNo
redemption_limitNo
stackableNo
currencyNo
Behavior2/5

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

Annotations (readOnlyHint=false, destructiveHint=false) indicate mutation but non-destructiveness. The description adds no behavioral context beyond the annotations, such as side effects or permissions, so minimal additional value.

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 concise with two structured sentences, front-loading the purpose and endpoint, then listing enums and optional fields. Minor improvement possible but overall efficient.

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?

Missing key details: return value, error cases, authentication/rate limits, and an incorrect required field listing (description says 'Required: code' but schema requires site and code). Incomplete for a complex 14-parameter tool.

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

Parameters2/5

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

With 0% schema description coverage, the description must explain all 14 parameters. It lists enum values and notes valid_from is ISO8601, but fails to explain fields like stackable, redemption_limit, and critically omits the required 'site' parameter (only mentions 'code'). Insufficient for effective parameter understanding.

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 explicitly states 'Create a discount' along with the HTTP endpoint, clearly identifying the tool's purpose. It distinguishes from sibling tools like discount_delete, discount_get, and discount_update.

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 verb 'create' implies usage for new discount creation, and the presence of sibling tools suggests when not to use it (e.g., update/delete). However, no explicit when-not or prerequisites are stated, leaving room for ambiguity.

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/runnel/voog-mcp'

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