list_products
Retrieve products from your Paddle catalog with filtering, sorting, and pagination options. Include pricing details and manage large catalogs efficiently.
Instructions
This tool will list products in the account's catalog.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter products by id, status, taxCategory, and type 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. Amounts are in the smallest currency unit (e.g., cents).
Use the include parameter to include related entities in the response:
prices: An array of price entities tied to the product.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Return entities after the specified Paddle ID when working with paginated endpoints. | |
| id | No | Return only the IDs specified. Use a comma-separated list to get multiple entities. | |
| include | No | Include related entities in the response. Use a comma-separated list to specify multiple entities. | |
| orderBy | No | Order returned entities by the specified field and direction. | |
| perPage | No | Set how many entities are returned per page. Returns the maximum number of results if a number greater than the maximum is requested. | |
| status | No | Return entities that match the specified status. Use a comma-separated list to specify multiple status values. | |
| taxCategory | No | Return entities that match the specified tax category. Use a comma-separated list to specify multiple tax categories. | |
| type | No | Return items that match the specified type. |
Implementation Reference
- src/functions.ts:39-48 (handler)The main handler function that executes the list_products tool. It calls paddle.products.list(params), fetches the first page of products, computes pagination data, and returns both.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 for list_products, specifying method name, description (from prompts), Zod parameters schema (imported), and required actions (products read/list).method: "list_products", name: "List products", description: prompts.listProductsPrompt, parameters: params.listProductsParameters, actions: { products: { read: true, list: true, }, }, },
- src/api.ts:10-10 (registration)Maps the LIST_PRODUCTS constant to the listProducts function handler in the toolMap used by PaddleAPI to dispatch tool calls.[TOOL_METHODS.LIST_PRODUCTS]: funcs.listProducts,
- src/constants.ts:2-2 (registration)Defines the TOOL_METHODS.LIST_PRODUCTS constant as "list_products", used in tool definitions and mappings.LIST_PRODUCTS: "list_products",