get_business
Retrieve business information from Paddle Billing by providing customer and business IDs to access specific organizational data.
Instructions
This tool will retrieve a business for a customer from Paddle using its ID and related customer ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | Yes | Paddle ID of the customer. | |
| businessId | Yes | Paddle ID of the business. |
Implementation Reference
- src/functions.ts:364-372 (handler)The main handler function for the 'get_business' tool. It destructures customerId and businessId from the input parameters and retrieves the business data using the Paddle SDK's businesses.get method, handling errors by returning them.export const getBusiness = async (paddle: Paddle, params: z.infer<typeof Parameters.getBusinessParameters>) => { try { const { customerId, businessId } = params; const business = await paddle.businesses.get(customerId, businessId); return business; } catch (error) { return error; } };
- src/tools.ts:348-358 (schema)Tool schema definition including the method name, human-readable name, description prompt, Zod input parameters schema reference, and required actions/permissions for the 'get_business' tool.{ method: "get_business", name: "Get a business for a customer", description: prompts.getBusinessPrompt, parameters: params.getBusinessParameters, actions: { businesses: { read: true, get: true, }, },
- src/api.ts:39-39 (registration)Maps the TOOL_METHODS.GET_BUSINESS constant to the getBusiness handler function in the toolMap object, which is used by the PaddleAPI class to dispatch tool calls.[TOOL_METHODS.GET_BUSINESS]: funcs.getBusiness,
- src/constants.ts:31-31 (helper)Constant definition for the tool method identifier 'get_business', used in registration and schema definitions.GET_BUSINESS: "get_business",