get_simulation_run_event
Retrieve and analyze simulation event details from Paddle to verify delivery status, debug issues, and check payload and response data for troubleshooting.
Instructions
This tool will retrieve an event sent by a simulation run from Paddle by its ID.
Check the following details to understand the success or failure of the event according to Paddle and debug issues:
status: Status of the event according to Paddle.
pending: No attempt has been made to deliver the event yet.
success: The event was delivered successfully.
failure: Paddle tried to deliver the simulated event, but it failed. If response object is null, no response received from the server. Check the notification setting endpoint configuration.
aborted: Paddle couldn't attempt delivery of the simulated event.
payload: Payload sent by Paddle for this event within the simulation.
request.body: Request body sent by Paddle.
response.body: Response body sent by the responding server. May be empty for success responses.
response.statusCode: HTTP status code sent by the responding server.
If the destination URL is using a tunnel or proxy service, the response may be from the tunnel or proxy service, not the original server. Don't assume success or failure based on the status and response alone. Check the logs of the tunnel/proxy service and the destination server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| simulationId | Yes | Paddle ID of the simulation entity associated with the run the event was sent as part of. | |
| simulationRunId | Yes | Paddle ID of the simulation run entity the event was sent as part of. | |
| simulationEventId | Yes | Paddle ID of the simulation event entity to get. |
Implementation Reference
- src/functions.ts:673-684 (handler)The main handler function that implements the core logic for the 'get_simulation_run_event' tool. It destructures the required parameters (simulationId, simulationRunId, simulationEventId) and calls the Paddle SDK's simulationRunEvents.get method to retrieve the specific simulation run event.export const getSimulationRunEvent = async ( paddle: Paddle, params: z.infer<typeof Parameters.getSimulationRunEventParameters>, ) => { try { const { simulationId, simulationRunId, simulationEventId } = params; const simulationRunEvent = await paddle.simulationRunEvents.get(simulationId, simulationRunId, simulationEventId); return simulationRunEvent; } catch (error) { return error; } };
- src/tools.ts:902-912 (schema)Tool schema definition including method name, description prompt, Zod parameters schema reference, and required actions for the 'get_simulation_run_event' tool.method: "get_simulation_run_event", name: "Get an event for a simulation run", description: prompts.getSimulationRunEventPrompt, parameters: params.getSimulationRunEventParameters, actions: { simulationRunEvents: { read: true, get: true, }, }, },
- src/api.ts:63-63 (registration)Registration of the handler function in the toolMap within PaddleAPI class, mapping the constant TOOL_METHODS.GET_SIMULATION_RUN_EVENT to funcs.getSimulationRunEvent.[TOOL_METHODS.GET_SIMULATION_RUN_EVENT]: funcs.getSimulationRunEvent,
- src/constants.ts:55-55 (registration)Constant definition for the tool method name 'get_simulation_run_event' used in registration and tool definitions.GET_SIMULATION_RUN_EVENT: "get_simulation_run_event",