Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

create_discount

Create discounts in Paddle to reduce transaction totals using flat amounts, percentages, or per-unit pricing. Generate codes for customer checkout or apply manually during sales.

Instructions

This tool will create a new discount in Paddle.

Discounts reduce a transaction total. They're sometimes called coupons or promo codes.

Use discount codes to let customers apply discounts themselves at checkout, or apply discounts manually to transactions as part of the sales process.

Discounts can be added to a discount group to organize them. Only one discount group can be added at a time. List discounts by discount groups with the list_discount_groups tool to see which discounts are in which groups.

When selecting type, choose the one that best describes how to apply the discount to the total:

  • flat: Discounts a checkout or transaction by a flat amount, for example -$100. Requires currencyCode.

  • flat_per_seat: Discounts a checkout or transaction by a flat amount per unit, for example -$100 per user. Requires currencyCode.

  • percentage: Discounts a checkout or transaction by a percentage of the total, for example -10%. Maximum 100%.

When selecting mode, choose the one that best describes the use case:

  • standard: Standard discount. Can be considered part of the listed catalog and reused across transactions and subscriptions easily.

  • custom: Non-catalog discount. Custom, one-off discounts. Includes checkout recovery discounts. Not returned when listing or shown in the Paddle dashboard.

Ensure you have all the information needed before making the call. Don't fabricate, imagine, or infer details and parameter values unless explicitly asked to. If anything is ambiguous, unknown, or unclear, ask the user for clarification or details before you proceed.

If successful, the response includes a copy of the new discount entity. Discounts can be applied to transactions, subscriptions, or passed to checkout through Paddle.js.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesShort description for this discount. Not shown to customers.
enabledForCheckoutNoWhether this discount can be redeemed by customers at checkout (`true`) or not (`false`).
codeNoUnique code that customers can use to redeem this discount at checkout. Use letters and numbers only, up to 32 characters. Not case-sensitive. If omitted and `enabledForCheckout` is `true`, Paddle generates a random 10-character code.
typeYesType of discount. Determines how this discount impacts the checkout or transaction total.
modeNoDiscount mode. Standard discounts are considered part of the listed catalog and are shown in the Paddle dashboard.
amountYesAmount to discount by. For `percentage` discounts, must be an amount between `0.01` and `100`. For `flat` and `flat_per_seat` discounts, amount in the lowest denomination for a currency.
currencyCodeNoSupported three-letter ISO 4217 currency code. Required where discount type is `flat` or `flat_per_seat`.
recurNoWhether this discount applies for multiple subscription billing periods (`true`) or not (`false`). If omitted, defaults to `false`.
maximumRecurringIntervalsNoNumber of subscription billing periods that this discount recurs for. Requires `recur`. `null` if this discount recurs forever. Subscription renewals, mid-cycle changes, and one-time charges billed to a subscription aren't considered a redemption. `timesUsed` is not incremented in these cases.
usageLimitNoMaximum number of times this discount can be redeemed. This is an overall limit for this discount, rather than a per-customer limit. `null` if this discount can be redeemed an unlimited amount of times. Paddle counts a usage as a redemption on a checkout, transaction, or the initial application against a subscription. Transactions created for subscription renewals, mid-cycle changes, and one-time charges aren't considered a redemption.
restrictToNoProduct or price IDs that this discount is for. When including a product ID, all prices for that product can be discounted. `null` if this discount applies to all products and prices.
expiresAtNoRFC 3339 datetime string of when this discount expires. Discount can no longer be redeemed after this date has elapsed. `null` if this discount can be redeemed forever. Expired discounts can't be redeemed against transactions or checkouts, but can be applied when updating subscriptions.
customDataNoAny structured custom key-value data needed outside of Paddle's standard fields. Occasionally used by third-parties.

Implementation Reference

  • The handler function that implements the core logic of the 'create_discount' tool by calling the Paddle SDK's discounts.create method with the provided parameters.
    export const createDiscount = async (paddle: Paddle, params: z.infer<typeof Parameters.createDiscountParameters>) => {
      try {
        const discount = await paddle.discounts.create(params);
        return discount;
      } catch (error) {
        return error;
      }
    };
  • src/api.ts:67-67 (registration)
    Registration of the 'create_discount' tool method to its handler function (createDiscount) in the toolMap used by the PaddleAPI.
    [TOOL_METHODS.CREATE_DISCOUNT]: funcs.createDiscount,
  • Tool definition including schema (parameters), description, name, and required actions for 'create_discount'.
    {
      method: "create_discount",
      name: "Create a discount",
      description: prompts.createDiscountPrompt,
      parameters: params.createDiscountParameters,
      actions: {
        discounts: {
          write: true,
          create: true,
        },
      },
  • src/constants.ts:59-59 (registration)
    Constant definition for the 'create_discount' tool method name.
    CREATE_DISCOUNT: "create_discount",
Behavior4/5

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

Annotations indicate this is a mutation tool (readOnlyHint=false, destructiveHint=false). The description adds valuable context beyond annotations: it explains what discounts do ('reduce a transaction total'), mentions successful response includes 'a copy of the new discount entity', and notes discounts can be applied to transactions/subscriptions/checkout. It doesn't cover rate limits or auth needs, but provides good behavioral insight.

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 appropriately sized and well-structured: it starts with purpose, then usage guidelines, parameter explanations, and implementation warnings. Most sentences earn their place, though the final paragraph about successful response could be more integrated. Some redundancy exists in explaining discount applications.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool with 13 parameters, 100% schema coverage, and no output schema, the description does well: it covers purpose, usage, key parameter semantics, and behavioral outcomes. It could better explain error cases or the full response structure, but provides sufficient context for an agent to use the tool effectively.

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?

With 100% schema description coverage, the baseline is 3. The description adds significant value by explaining the semantic meaning of 'type' and 'mode' enums with examples and requirements (e.g., 'flat requires currencyCode'), and clarifies organizational context ('discounts can be added to a discount group'). This goes well beyond the schema's technical descriptions.

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 with a specific verb ('create') and resource ('new discount in Paddle'), and distinguishes it from siblings by explaining what discounts are and their function. It explicitly differentiates from list_discount_groups for organization purposes.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool (for creating discounts for checkout or manual application) and when to use alternatives (list_discount_groups for viewing organization). It also includes prerequisites ('Ensure you have all the information needed') and warns against fabrication.

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/PaddleHQ/paddle-mcp-server'

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