Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

create_discount_group

Create a discount group in Paddle to organize and manage related discounts under a single name for campaigns, promotions, or team management.

Instructions

This tool will create a new discount group in Paddle.

Discount groups are used to organize and manage related discounts under a group name. Create one when managing multiple discounts together, like for a campaign, promotion, or team.

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 group entity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of this discount group.

Implementation Reference

  • The handler function that executes the create_discount_group tool logic by creating a discount group using the Paddle SDK.
    export const createDiscountGroup = async (paddle: Paddle, params: z.infer<typeof Parameters.createDiscountGroupParameters>) => {
      try {
        const discountGroup = await paddle.discountGroups.create(params);
        return discountGroup;
      } catch (error) {
        return error;
      }
    };
  • The MCP tool schema definition, including method, name, description, parameters (Zod schema reference), and required actions permissions.
      method: "create_discount_group",
      name: "Create a discount group",
      description: prompts.createDiscountGroupPrompt,
      parameters: params.createDiscountGroupParameters,
      actions: {
        discountGroups: {
          write: true,
          create: true,
        },
      },
    },
  • src/api.ts:71-71 (registration)
    Registration of the createDiscountGroup handler in the toolMap object used by PaddleAPI to route tool calls.
    [TOOL_METHODS.CREATE_DISCOUNT_GROUP]: funcs.createDiscountGroup,
  • src/toolkit.ts:70-85 (registration)
    Dynamic registration of all tools, including create_discount_group, in the MCP server using this.tool() in a loop over tools array.
      tool.method,
      tool.description,
      tool.parameters.shape,
      annotations,
      async (arg: unknown, _extra: unknown) => {
        const result = await this._paddle.run(tool.method, arg);
        return {
          content: [
            {
              type: "text" as const,
              text: String(result),
            },
          ],
        };
      },
    );
  • Constant defining the string identifier for the CREATE_DISCOUNT_GROUP tool method.
    CREATE_DISCOUNT_GROUP: "create_discount_group",
Behavior3/5

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

Annotations provide readOnlyHint=false and destructiveHint=false, indicating this is a non-destructive write operation. The description adds that 'If successful, the response includes a copy of the new discount group entity,' which provides useful behavioral context about the return value. However, it doesn't mention authentication requirements, rate limits, or potential side effects beyond what annotations already cover.

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?

The description is reasonably structured with purpose first, then usage context, then behavioral notes. However, the middle paragraph contains generic advice ('Don't fabricate, imagine, or infer details') that applies to all tools rather than being specific to this one, reducing efficiency. The core information could be conveyed more concisely without losing value.

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 a single parameter with full schema coverage and annotations indicating a non-destructive write operation, the description provides adequate context about what the tool does and when to use it. However, without an output schema, the description only briefly mentions the response format. For a creation tool, more detail about what constitutes success/failure or the structure of the returned entity would be helpful.

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?

The input schema has 100% description coverage with a single 'name' parameter fully documented. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3. The general advice about 'Ensure you have all the information needed' doesn't provide specific parameter semantics.

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 clearly states the tool 'will create a new discount group in Paddle' and explains that discount groups 'are used to organize and manage related discounts under a group name.' This provides a specific verb (create) and resource (discount group) with context about its purpose. However, it doesn't explicitly differentiate from sibling tools like 'create_discount' or 'list_discount_groups' beyond mentioning the group concept.

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?

The description provides implied usage guidance by stating 'Create one when managing multiple discounts together, like for a campaign, promotion, or team.' This gives context for when to use it but doesn't explicitly mention when NOT to use it or name alternatives (e.g., 'create_discount' for individual discounts). The additional text about ensuring information and not fabricating details is general advice rather than specific tool usage guidance.

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