event_details
Retrieve analyzed context and raw HTTP request/response data for a specific event using the event ID. Optionally include receipt validation details.
Instructions
Get detailed information about a specific event.
Returns both analyzed data (context, content) and raw event data (request, response, external API calls)
Raw data includes the HTTP request/response and any external requests made (e.g. Apple/Google/Stripe API calls)
Sensitive fields are removed and large payloads are trimmed
Optionally includes receipt validation details
Use an eventId from event_list results
Requires validator version 3.12+
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventId | Yes | The event ID to get details for | |
| receipts | No | Include receipt validation details (default: false) |
Implementation Reference
- src/tools/events.ts:154-175 (handler)Handler case for 'event_details' tool: fetches event details via API, truncates raw HTTP data, and returns JSON with full analysis context.
case 'event_details': console.error(`Fetching event details for:`, args.eventId); const details = await this.api.getEventDetails(args.eventId, { receipts: args.receipts }); // Truncate only the raw HTTP data (request/response/externalRequests). // The analysis section stays full-length so users still see complete // product IDs, transaction IDs, and error messages — the clutter we // want to cut is the multi-kilobyte Base64 receipts, certificates, // and JWT tokens that live only under `raw`. Truthy guard also // covers the pre-3.12 fallback path where `raw` is absent. if (details.raw) { details.raw = truncateLongStrings(details.raw, 128); } return { content: [{ type: "text", text: JSON.stringify(details, null, 2) }] }; default: throw new Error(`Unknown event tool: ${name}`); } - src/tools/events.ts:78-97 (schema)InputSchema definition for event_details: requires eventId (string), optional receipts (boolean), and optionally appName if using master key.
inputSchema: { type: "object", properties: { eventId: { type: "string", description: "The event ID to get details for" }, receipts: { type: "boolean", description: "Include receipt validation details (default: false)" }, ...(appNameRequired ? { appName: { type: "string", description: "Name of the app to fetch data from. Required when using master key." } } : {}) }, required: appNameRequired ? ["eventId", "appName"] : ["eventId"] } - src/tools/events.ts:69-79 (registration)Tool registration/definition with name 'event_details' and its description in the getTools() method within EventTools class.
{ name: "event_details", description: `Get detailed information about a specific event. - Returns both analyzed data (context, content) and raw event data (request, response, external API calls) - Raw data includes the HTTP request/response and any external requests made (e.g. Apple/Google/Stripe API calls) - Sensitive fields are removed and large payloads are trimmed - Optionally includes receipt validation details - Use an eventId from event_list results - Requires validator version 3.12+${appNameRequired ? '\n- Requires appName parameter when using master key' : ''}`, inputSchema: { type: "object", - src/iaptic-api.ts:274-289 (helper)API method getEventDetails: makes HTTP GET to /events/:id (v3.12+) or falls back to /events/:id/analysis, optionally including receipts.
async getEventDetails(eventId: string, params?: { receipts?: boolean }) { const version = await this.getValidatorVersion(); const [major, minor] = version.split('.').map(Number); if (major > 3 || (major === 3 && minor >= 12)) { // Use the combined /events/:id endpoint (v3.12+) const response = await this.client.get(`/events/${eventId}`, { params: params?.receipts ? { receipts: 'true' } : undefined }); return response.data; } // Fallback to analysis-only endpoint for older validators const response = await this.client.get(`/events/${eventId}/analysis`, { params: params?.receipts ? { receipts: '1' } : undefined }); return { analysis: response.data }; } - src/server.ts:105-107 (registration)Server routing: tool calls prefixed with 'event_' (including event_details) are routed to EventTools.handleTool().
if (name.startsWith('event_')) { return await this.tools.events.handleTool(name, args); }