Skip to main content
Glama
PaddleHQ
by PaddleHQ

list_discount_groups

Retrieve discount groups from your Paddle account catalog with pagination, filtering by ID, and customizable sorting options.

Instructions

This tool will list discount groups in the account's catalog.

Use the maximum perPage by default (200) to ensure comprehensive results. Filter discount groups by id as needed. Results are paginated - use the 'after' parameter with the last ID from previous results to get the next page. Sort and order results using the orderBy parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoReturn entities after the specified Paddle ID when working with paginated endpoints.
idNoReturn only the IDs specified. Use a comma-separated list to get multiple entities.
orderByNoOrder returned entities by the specified field and direction.
perPageNoSet how many entities are returned per page. Returns the maximum number of results if a number greater than the maximum is requested.

Implementation Reference

  • The handler function that executes the core logic for listing discount groups using the Paddle SDK, fetching paginated results.
    export const listDiscountGroups = async (paddle: Paddle, params: z.infer<typeof Parameters.listDiscountGroupsParameters>) => { try { const collection = paddle.discountGroups.list(params); const discountGroups = await collection.next(); const pagination = paginationData(collection); return { pagination, discountGroups }; } catch (error) { return error; } };
  • Tool definition including the method name, description, Zod parameters schema reference, and required actions for the 'list_discount_groups' tool.
    { method: "list_discount_groups", name: "List discount groups", description: prompts.listDiscountGroupsPrompt, parameters: params.listDiscountGroupsParameters, actions: { discountGroups: { read: true, list: true, }, }, },
  • src/api.ts:70-70 (registration)
    Maps the LIST_DISCOUNT_GROUPS tool method constant to its handler function in the toolMap object.
    [TOOL_METHODS.LIST_DISCOUNT_GROUPS]: funcs.listDiscountGroups,
  • Constant defining the string identifier for the 'list_discount_groups' tool method.
    LIST_DISCOUNT_GROUPS: "list_discount_groups",

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