get_product
Retrieve product details by ID from Paddle, optionally including price information for comprehensive billing management.
Instructions
This tool will retrieve a product from Paddle by its ID.
Use the include parameter to include related entities in the response:
prices: An array of price entities available for the product.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| productId | Yes | Paddle ID of the product. | |
| include | No | Include related entities in the response. Use a comma-separated list to specify multiple entities. |
Implementation Reference
- src/functions.ts:59-68 (handler)The core handler function implementing the get_product tool logic. It extracts productId and optional query parameters, calls paddle.products.get, and returns the product or error.export const getProduct = async (paddle: Paddle, params: z.infer<typeof Parameters.getProductParameters>) => { try { const { productId, ...queryParams } = params; const hasQueryParams = Object.keys(queryParams).length > 0; const product = await paddle.products.get(productId, hasQueryParams ? queryParams : undefined); return product; } catch (error) { return error; } };
- src/tools.ts:46-56 (schema)Tool schema definition including method name, description from prompts, Zod parameters schema, and required actions for permissions.{ method: "get_product", name: "Get a product", description: prompts.getProductPrompt, parameters: params.getProductParameters, actions: { products: { read: true, get: true, }, },
- src/api.ts:12-12 (registration)Maps the GET_PRODUCT constant to the getProduct handler function in the toolMap used by PaddleAPI to execute tools.[TOOL_METHODS.GET_PRODUCT]: funcs.getProduct,
- src/constants.ts:4-4 (registration)Constant defining the string identifier for the get_product tool method.GET_PRODUCT: "get_product",