Skip to main content
Glama
cmssy-io

@cmssy/mcp-server

Official
by cmssy-io

create_discount

Create discount codes as percentage, fixed amount, or free shipping. Add optional limits for minimum subtotal, max uses, and validity period after the user agrees to the code.

Instructions

Create a discount code. type is 'percentage' (value 0-100), 'fixed' (value in minor currency units, requires currency e.g. 'USD'), or 'free_shipping' (value 0). Optional limits: minSubtotal, maxUses, startsAt, endsAt. Only call AFTER the user explicitly agreed to the code you described.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoThe discount code
typeNo
valueNoPercent (0-100), fixed amount in minor units, or 0
endsAtNoISO date-time the code expires
enabledNo
maxUsesNoTotal redemption cap
currencyNoISO 4217 code, required for 'fixed' type, omit otherwise
startsAtNoISO date-time the code becomes valid
minSubtotalNoMinimum order subtotal in minor units

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.73.1

TDQS

A3.9/5.0
Behavior2/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It explains input constraints (e.g., currency required for fixed type) but does not mention expected side effects, potential errors (e.g., duplicate code), permission requirements, or idempotency. The warning about user agreement hints at sensitivity but does not describe what happens when the tool is called without consent. This is a significant gap for a mutation tool.

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

Conciseness5/5

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

The description is two sentences, front-loading the purpose and then delivering critical parameter semantics and a usage condition. Every sentence earns its place; there is no fluff. The structure guides the agent from intent to constraints to prerequisite.

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 description covers the essential inputs and the key usage condition, but it omits mention of the 'enabled' parameter (default true) and does not address potential failure modes like code collisions. For a tool with 9 parameters and no output schema, it is adequate but not exhaustive. The absence of an output schema reduces the need to describe return values, yet the description could be more complete by noting that creation is immediate and irreversible.

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?

The description adds meaningful semantic detail beyond the schema, particularly for the 'type' parameter: it explains the value ranges for percentage, fixed, and free_shipping, and specifies when currency is required or omitted. It also lists optional limits (minSubtotal, maxUses, startsAt, endsAt), reinforcing their purpose. Since schema coverage is 78%, the description's extra guidance elevates it above the baseline.

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 tool's purpose: 'Create a discount code.' It explains the three valid types with specific value constraints, which distinguishes it from other create_* tools. The verb and resource are precise, leaving no ambiguity about the operation.

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 provides a strong usage condition: 'Only call AFTER the user explicitly agreed to the code you described.' This tells the agent when it is appropriate to invoke the tool. However, it does not explicitly contrast with sibling tools like update_discount, set_discount_enabled, or list_discounts, though the name and context make the distinction clear.

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