Skip to main content
Glama

dastyar_admin_create_discount_code

Create a new promotional discount coupon code with fixed amount or percentage, usage capacity, expiration, and maximum discount ceiling.

Instructions

Create a new promotional discount coupon code

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "dastyar_admin_create_discount_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesDiscount code text (e.g. NOROOZ1403)
amountNoFixed discount amount in Tomans
percentNoPercentage discount (1-100)
capacityNoMax usage count
expireAtNoISO date string of expiration
maxDiscountNoMaximum discount ceiling

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it only says "new". It does not disclose what happens on a duplicate code, whether amount and percent are mutually exclusive or combined, whether codes are instantly active, or any permission/auth requirement 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.

Conciseness3/5

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

A single short sentence with no wasted words and the action front-loaded, but it is terse to the point of under-specification for a six-parameter mutation. Brevity here is not compensating for anything.

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?

For a six-parameter write tool with no annotations and no output schema, the definition leaves key behavior unexplained: duplicate-code handling, amount/percent interplay, and what the call returns (e.g. the created code object). The schema covers the inputs but not the operation's contract.

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?

All six parameters already have descriptions at 100% schema coverage (code, amount in Tomans, percent 1-100, capacity, expireAt ISO date, maxDiscount ceiling), so the baseline is 3. The description adds nothing about parameter semantics, notably the implied amount-vs-percent choice.

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?

States a specific verb+resource: "Create a new promotional discount coupon code". An agent can distinguish this from dastyar_admin_delete_discount_code and dastyar_admin_discount_codes on the strength of "Create" vs delete/list, though the description never names those siblings explicitly.

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?

No when-to-use or when-not-to-use guidance, no prerequisites, and no mention of the listing/deletion siblings. An agent must infer that "create" is the write path and that dastyar_admin_discount_codes is the read path.

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

Deploy Server

Other Tools