Skip to main content
Glama

discount_create

Creates a discount in Voog ecommerce. Define code, amount, type (fixed/percentage), and apply to cart, categories, products, or shipping.

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
Behavior4/5

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

Annotations indicate non-readOnly, non-destructive, non-idempotent. The description confirms it creates a discount via POST, and adds empirically verified enum values. It does not mention authentication, rate limits, or error behavior beyond client-side validation.

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 and front-loaded with the endpoint and required fields. The use of bullet-like enumeration organizes information well, though it could be slightly more structured.

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?

Given no output schema and 14 parameters, the description covers enums and required fields but lacks information about return values, error handling, or behavior for optional fields. More details on the response or side effects would improve completeness.

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

Parameters5/5

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

With 0% schema description coverage, the description compensates by listing all optional parameters, specifying enum values for 4 parameters, and noting date format (ISO8601). This adds significant meaning beyond the schema.

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 action ('Create a discount'), specifies the HTTP method and endpoint (POST /admin/api/ecommerce/v1/discounts), and lists required fields. This distinguishes it from sibling tools like discount_update or discount_delete.

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 when to use the tool (to create a discount) and provides required parameters. However, it does not explicitly mention when not to use it or compare with alternative tools like discount_update for modifications.

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