Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

get_discount_group

Retrieve a discount group from Paddle Billing by its unique ID to access discount details and apply them to transactions.

Instructions

This tool will retrieve a discount group from Paddle by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
discountGroupIdYesPaddle ID of the discount group.

Implementation Reference

  • The core handler function implementing the get_discount_group tool logic. It takes a Paddle instance and validated params, extracts discountGroupId, fetches the discount group via Paddle SDK, and returns it or the error.
    export const getDiscountGroup = async (paddle: Paddle, params: z.infer<typeof Parameters.getDiscountGroupParameters>) => {
      try {
        const { discountGroupId } = params;
        const discountGroup = await paddle.discountGroups.get(discountGroupId);
        return discountGroup;
      } catch (error) {
        return error;
      }
    };
  • src/tools.ts:191-202 (registration)
    Primary registration of the 'get_discount_group' tool, including method name, human-readable name, description prompt, parameters schema reference, and required permissions/actions.
    {
      method: "get_discount_group",
      name: "Get a discount group",
      description: prompts.getDiscountGroupPrompt,
      parameters: params.getDiscountGroupParameters,
      actions: {
        discountGroups: {
          read: true,
          get: true,
        },
      },
    },
  • src/api.ts:72-72 (registration)
    Maps the GET_DISCOUNT_GROUP constant to the getDiscountGroup handler function in the tool execution map used by PaddleAPI.
    [TOOL_METHODS.GET_DISCOUNT_GROUP]: funcs.getDiscountGroup,
  • src/constants.ts:64-64 (registration)
    Constant definition for the tool method string used in registrations and mappings.
    GET_DISCOUNT_GROUP: "get_discount_group",

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