list_prices
Retrieve and filter catalog prices from your Paddle account with pagination, sorting, and options to include related product details.
Instructions
This tool will list prices in the account's catalog.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter prices by id, productId, status, recurring, 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:
product: An object for the product entity that's tied to the price.
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. | |
| 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. | |
| productId | No | Return entities related to the specified product. Use a comma-separated list to specify multiple product IDs. | |
| status | No | Return entities that match the specified status. Use a comma-separated list to specify multiple status values. | |
| recurring | No | Determine whether returned entities are for recurring prices (`true`) or one-time prices (`false`). | |
| type | No | Return items that match the specified type. |
Implementation Reference
- src/functions.ts:80-89 (handler)The core handler function for the "list_prices" tool. It invokes paddle.prices.list(params), fetches the first page of results with next(), extracts pagination metadata using the paginationData helper, and returns an object containing pagination info and the list of prices.export const listPrices = async (paddle: Paddle, params: z.infer<typeof Parameters.listPricesParameters>) => { try { const collection = paddle.prices.list(params); const prices = await collection.next(); const pagination = paginationData(collection); return { pagination, prices }; } catch (error) { return error; } };
- src/tools.ts:70-81 (registration)Tool registration in the tools array exported from tools.ts. Defines the method name, human-readable name, description prompt, Zod parameters schema reference, and required permissions/actions for the list_prices tool.{ method: "list_prices", name: "List prices", description: prompts.listPricesPrompt, parameters: params.listPricesParameters, actions: { prices: { read: true, list: true, }, }, },
- src/api.ts:14-14 (registration)Maps the TOOL_METHODS.LIST_PRICES constant to the listPrices handler function in the toolMap object, which is used by PaddleAPI.run() to dispatch tool calls to the appropriate handler.[TOOL_METHODS.LIST_PRICES]: funcs.listPrices,
- src/functions.ts:10-13 (helper)Helper utility function used by the listPrices handler (and other list handlers) to extract pagination metadata (hasMore, estimatedTotal) from Paddle SDK collection objects.const paginationData = (collection: PaginatedCollection) => ({ hasMore: collection.hasMore, estimatedTotal: collection.estimatedTotal, });
- src/constants.ts:6-6 (registration)Constant definition for the "list_prices" tool method string, used as keys in registrations in api.ts and tools.ts.LIST_PRICES: "list_prices",