create_simulation_run
Create a new simulation run to send test webhook events to notification destinations after configuring a simulation in Paddle.
Instructions
This tool will create a new simulation run for a simulation in Paddle.
Test webhooks can be sent through the webhook simulator in the dashboard or via the API by creating and running a simulation. Simulation runs are used to send the test webhook events to the notification destination once the simulation has been configured.
If successful, the response includes a copy of the new simulation run entity. All events sent by the simulation run can be seen using the list_simulations_events tool or including the 'events' parameter in the response when fetching the individual simulation run using the get_simulation_run tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| simulationId | Yes | Paddle ID of the simulation to create a run for. |
Implementation Reference
- src/functions.ts:627-638 (handler)The core handler function that executes the tool logic by creating a simulation run using the Paddle SDK's simulationRuns.create method.export const createSimulationRun = async ( paddle: Paddle, params: z.infer<typeof Parameters.createSimulationRunParameters>, ) => { try { const { simulationId } = params; const simulationRun = await paddle.simulationRuns.create(simulationId); return simulationRun; } catch (error) { return error; } };
- src/tools.ts:866-876 (registration)Tool definition and registration, including the method name, description prompt, Zod schema reference for parameters, and required actions.method: "create_simulation_run", name: "Create a run for a simulation", description: prompts.createSimulationRunPrompt, parameters: params.createSimulationRunParameters, actions: { simulationRuns: { write: true, create: true, }, }, },
- src/api.ts:60-60 (registration)Mapping of the tool method constant to the handler function in the API's toolMap.[TOOL_METHODS.CREATE_SIMULATION_RUN]: funcs.createSimulationRun,
- src/constants.ts:52-52 (registration)Constant definition for the tool method string identifier.CREATE_SIMULATION_RUN: "create_simulation_run",