Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

list_discount_groups

Read-only

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",
Behavior4/5

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

Annotations provide readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond this: it specifies pagination behavior ('Results are paginated'), recommends a default perPage value ('Use the maximum perPage by default (200)'), and explains how to navigate pages ('use the 'after' parameter with the last ID'). This enhances the agent's understanding of how to use the tool effectively, though it doesn't cover rate limits or authentication needs.

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?

The description is front-loaded with the core purpose, followed by specific usage tips in a bullet-like structure. Each sentence adds practical value: default settings, filtering, pagination mechanics, and sorting. There is no wasted text, and the information is efficiently organized for quick comprehension by an agent.

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?

Given the tool's complexity (a list operation with pagination and filtering), the description is reasonably complete. It covers key behavioral aspects like pagination and default usage, and annotations handle the safety profile. However, without an output schema, it doesn't describe the return format (e.g., structure of discount group objects), which is a minor gap for a list tool. Sibling tools provide context, but the description doesn't leverage this for differentiation.

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 100%, so the schema already documents all parameters thoroughly. The description adds some semantic context: it emphasizes using the maximum perPage for comprehensive results, clarifies that 'after' uses the last ID for pagination, and mentions filtering by ID and sorting with orderBy. However, this mostly reinforces rather than significantly extends the schema information, meeting the baseline for high coverage.

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's purpose: 'list discount groups in the account's catalog.' This specifies the verb ('list') and resource ('discount groups'), and the context ('account's catalog') provides helpful scope. However, it doesn't explicitly differentiate from sibling tools like 'get_discount_group' (singular) or 'list_discounts', which would be needed for a perfect score.

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 mentioning pagination, filtering by ID, and sorting, suggesting this tool is for browsing or searching discount groups. However, it lacks explicit when-to-use directives, such as contrasting with 'get_discount_group' for single entities or explaining scenarios where listing is preferred over getting specific IDs. No alternatives or exclusions are named.

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