list_prices
Retrieve and filter prices from your Paddle catalog by product ID, status, or type. Supports pagination, sorting, and including related entities like products. Amounts are in the smallest currency unit (e.g., cents).
Instructions
This tool will list prices in your Paddle catalog.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter prices by product ID, 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 results using orderBy parameter. Include related entities like products if needed. Amounts are in the smallest currency unit (e.g., cents).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for pagination. Returns results after the cursor position. | |
| id | No | Filter by a list of price IDs. Use this to retrieve multiple prices by ID. | |
| include | No | Related entities to include in the response. | |
| orderBy | No | Sort field and order. | |
| perPage | No | Number of records to return per page. Default is 25, maximum is 50. | |
| productId | No | Filter by a list of product IDs. Returns prices for the specified products. | |
| status | No | Filter by price status. Returns prices with the specified statuses. |
Implementation Reference
- src/functions.ts:80-89 (handler)The main handler function for the 'list_prices' tool. It uses the Paddle SDK to list prices with the provided parameters, fetches the first page of results, computes pagination data, and returns the prices along with pagination info. Errors are caught and returned.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 (schema)Tool schema definition for 'list_prices' including method name, human-readable name, description prompt, input parameters schema (Zod), and required actions/permissions.{ method: "list_prices", name: "List prices", description: prompts.listPricesPrompt, parameters: params.listPricesParameters, actions: { prices: { read: true, list: true, }, }, },
- src/api.ts:14-14 (registration)Registration of the 'list_prices' handler in the central toolMap used by PaddleAPI to dispatch tool calls to the correct function.[TOOL_METHODS.LIST_PRICES]: funcs.listPrices,
- src/constants.ts:6-6 (helper)Constant definition for the 'list_prices' tool method string, used across the codebase for consistency.LIST_PRICES: "list_prices",