list_products
Retrieve and manage products from your Paddle catalog with pagination, filtering by status, tax category, and type, and sorting options. Includes related entities like prices for detailed insights.
Instructions
This tool will list products in your Paddle catalog.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter products by status, tax category, and type as needed. Results are paginated - use the 'after' parameter with the last ID from previous results to get the next page. Sort results using orderBy parameter. Include related entities like prices if needed. Amounts are in the smallest currency unit (e.g., cents).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for use in pagination. Represents the ID of the last entity in the previous page of results. | |
| id | No | Filter products by their ID. Accepts multiple values. | |
| include | No | Related data to include in the response. | |
| orderBy | No | Sort order for returned items. | |
| perPage | No | Number of items to be returned per page (default: 25, maximum: 50). | |
| status | No | Filter products by their status. Accepts multiple values. | |
| taxCategory | No | Filter products by their tax category. Accepts multiple values. | |
| type | No | Filter products by their type. Accepts multiple values. |
Implementation Reference
- src/functions.ts:39-48 (handler)The main handler function that executes the list_products tool logic using the Paddle SDK to list products with pagination.export const listProducts = async (paddle: Paddle, params: z.infer<typeof Parameters.listProductsParameters>) => { try { const collection = paddle.products.list(params); const products = await collection.next(); const pagination = paginationData(collection); return { pagination, products }; } catch (error) { return error; } };
- src/tools.ts:23-33 (schema)Tool schema definition specifying the method, name, description, Zod parameters schema, and required actions for the list_products tool.method: "list_products", name: "List products", description: prompts.listProductsPrompt, parameters: params.listProductsParameters, actions: { products: { read: true, list: true, }, }, },
- src/api.ts:10-10 (registration)Registration of the listProducts handler function in the toolMap under the LIST_PRODUCTS key, used by PaddleAPI to dispatch tool calls.[TOOL_METHODS.LIST_PRODUCTS]: funcs.listProducts,
- src/constants.ts:2-2 (helper)Constant defining the tool method string 'list_products' used in schema and registration.LIST_PRODUCTS: "list_products",