list_events
Retrieve and manage event records from Paddle Billing to track subscription changes, transactions, and other notable actions for comprehensive monitoring and reporting.
Instructions
This tool will list events in Paddle.
When something notable occurs, Paddle creates an event entity with information about what happened. Events are created for actions regardless of how they happened and regardless of whether a notification setting is subscribed to be notified by Paddle.
Some actions might create multiple events. For example, resuming a subscription typically results in a subscription.resumed, transaction.created, and other transaction events being created.
Use the maximum perPage by default (200) to ensure comprehensive results. 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Return entities after the specified Paddle ID when working with paginated endpoints. | |
| 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. |
Implementation Reference
- src/functions.ts:501-510 (handler)The handler function for the 'list_events' tool. It calls paddle.events.list(params), fetches the first page of events, computes pagination data, and returns the results or any error.export const listEvents = async (paddle: Paddle, params: z.infer<typeof Parameters.listEventsParameters>) => { try { const collection = paddle.events.list(params); const events = await collection.next(); const pagination = paginationData(collection); return { pagination, events }; } catch (error) { return error; } };
- src/tools.ts:746-756 (schema)The tool schema definition for 'list_events', including method name, description from prompts, input parameters schema reference, and required actions/permissions.method: "list_events", name: "List events", description: prompts.listEventsPrompt, parameters: params.listEventsParameters, actions: { events: { read: true, list: true, }, }, },
- src/api.ts:50-50 (registration)Registration of the listEvents handler function in the toolMap used by PaddleAPI to dispatch tool calls.[TOOL_METHODS.LIST_EVENTS]: funcs.listEvents,
- src/constants.ts:42-42 (registration)Constant definition for the LIST_EVENTS tool method string, used in registration and tool definitions.LIST_EVENTS: "list_events",
- src/functions.ts:10-13 (helper)Helper function to extract pagination metadata from Paddle collection objects, used in listEvents and other list handlers.const paginationData = (collection: PaginatedCollection) => ({ hasMore: collection.hasMore, estimatedTotal: collection.estimatedTotal, });