Skip to main content
Glama

PayPing: create coupon

payping_create_coupon
Destructive

Creates an active discount coupon with a percent or fixed Toman amount and returns its code for sharing; confirm details with the user before creation.

Instructions

Create an active discount coupon; returns its code. Confirm with the user first.

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": {
      "name": "<name>",
      "kind": "<kind>",
      "amount": "<amount>"
    },
    "name": "payping_create_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesPercent off or fixed Toman off.
nameYes
amountYesPercent (1-100) or Toman, per `kind`.
max_usesNo
expires_onNoLast valid day (YYYY-MM-DD).
coupon_codeNoOmit to generate.
product_codesNoOmit for all products.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • changedInput schema / properties / coupon_code / description
      Previous value: -"Code buyers type; omit to generate."New value: +"Omit to generate."
    • changedInput schema / properties / kind / description
      Previous value: -"'percent' off, or a fixed Toman amount off."New value: +"Percent off or fixed Toman off."
    • changedInput schema / properties / product_codes / description
      Previous value: -"Limit to these products; omit for all."New value: +"Omit for all products."
  2. Changed9 schema fields changedv0.2.0
    • removedInput schema / properties / amount / title
      Removed value: -"Amount"
    • removedInput schema / properties / coupon_code / title
      Removed value: -"Coupon Code"
    • removedInput schema / properties / expires_on / title
      Removed value: -"Expires On"
    • removedInput schema / properties / kind / title
      Removed value: -"Kind"
    • removedInput schema / properties / max_uses / title
      Removed value: -"Max Uses"
    • removedInput schema / properties / name / title
      Removed value: -"Name"
    • removedInput schema / properties / product_codes / title
      Removed value: -"Product Codes"
    • removedInput schema / title
      Removed value: -"payping_create_couponArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "payping_create_couponDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, idempotentHint=false and readOnlyHint=false, so the warning profile is covered structurally. The description adds two useful facts beyond that: the call yields a `code`, and user confirmation is required beforehand. It does not explain why the operation is destructive (whether coupons can be revoked) or what happens on duplicate codes.

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?

Two tight clauses, zero filler, with the core action and the confirmation gate front-loaded. Nothing in the text could be removed without losing information.

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?

For a 7-parameter destructive mutation with no output schema, the description says just enough to call it correctly, and the mention of the returned `code` substitutes for the missing output schema. It falls short on failure behavior, validation constraints on `name`/`max_uses`, and the effect of a null `product_codes` scope.

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?

Schema description coverage is 71%, with `name` and `max_uses` undocumented in the schema, and the description adds no meaning for any parameter. The enum on `kind` and the amount semantics are already carried by the schema, so the description neither compensates for the gaps nor adds value here.

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 specific verb and resource ("Create an active discount coupon") plus the return value, so an agent immediately knows the operation. It does not distinguish itself from siblings such as payping_get_coupon or payping_create_product, but the create semantics are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Confirm with the user first" is a concrete usage directive that constrains when the agent may call the tool, which is more than most descriptions offer. However, there is no guidance on when to create a coupon versus alternatives, no prerequisites (e.g. product existence), and no mention of who can perform it.

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