list_simulations
Retrieve and manage simulation configurations in Paddle Billing. Filter by ID, status, or notification destination, with paginated results and sorting options.
Instructions
This tool will list simulations in Paddle.
These are the configurations for simulations, as opposed to the simulation runs which are used to send the events to the notification destination.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter simulations by notificationSettingId, id, and status 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Return entities after the specified Paddle ID when working with paginated endpoints. | |
| notificationSettingId | No | Return entities related to the specified notification destination. Use a comma-separated list to specify multiple notification destination IDs. | |
| 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. | |
| id | No | Return only the IDs specified. Use a comma-separated list to get multiple entities. | |
| status | No | Return entities that match the specified status. Use a comma-separated list to specify multiple status values. |
Implementation Reference
- src/functions.ts:564-573 (handler)The handler function that executes the list_simulations tool. It calls paddle.simulations.list(params), fetches the first page with next(), adds pagination info, and returns the result or error.export const listSimulations = async (paddle: Paddle, params: z.infer<typeof Parameters.listSimulationsParameters>) => { try { const collection = paddle.simulations.list(params); const simulations = await collection.next(); const pagination = paginationData(collection); return { pagination, simulations }; } catch (error) { return error; } };
- src/tools.ts:806-815 (schema)Defines the tool schema for MCP, specifying method name, description from prompts, Zod parameters schema, and required actions on simulations.method: "list_simulations", name: "List simulations", description: prompts.listSimulationsPrompt, parameters: params.listSimulationsParameters, actions: { simulations: { read: true, list: true, }, },
- src/api.ts:55-55 (registration)Registers the listSimulations handler in the toolMap dictionary, mapping the LIST_SIMULATIONS constant to the function for execution.[TOOL_METHODS.LIST_SIMULATIONS]: funcs.listSimulations,
- src/constants.ts:47-47 (registration)Defines the constant TOOL_METHODS.LIST_SIMULATIONS = "list_simulations" used in tool definitions and registrations.LIST_SIMULATIONS: "list_simulations",
- src/functions.ts:10-13 (helper)Helper function to extract pagination data from Paddle collections, used in listSimulations and other list handlers.const paginationData = (collection: PaginatedCollection) => ({ hasMore: collection.hasMore, estimatedTotal: collection.estimatedTotal, });