sentry_get_event
Retrieve specific Sentry event details by providing the project slug and event ID. Ideal for debugging and analyzing application errors and performance issues.
Instructions
Retrieve a specific Sentry event from an issue. Requires issue ID/URL and event ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventId | Yes | Event ID | |
| projectSlug | Yes | Project slug/identifier |
Implementation Reference
- src/index.ts:1165-1187 (handler)The MCP tool handler for 'sentry_get_event'. Extracts projectSlug and eventId, calls SentryAPIClient.getEvent(), formats and returns event details as text content.case "sentry_get_event": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { projectSlug, eventId } = args as any; const event = await apiClient.getEvent(projectSlug, eventId); return { content: [ { type: "text", text: `Event ${eventId} details:\n` + `- Title: ${event.title}\n` + `- Message: ${event.message}\n` + `- Platform: ${event.platform}\n` + `- Date: ${event.dateCreated}\n` + `- User: ${event.user ? JSON.stringify(event.user) : 'N/A'}\n` + `- Tags: ${JSON.stringify(event.tags)}`, }, ], }; }
- src/index.ts:529-546 (schema)JSON schema definition for the 'sentry_get_event' tool input, specifying required projectSlug and eventId parameters.{ name: "sentry_get_event", description: "Retrieve a specific Sentry event from an issue. Requires issue ID/URL and event ID.", inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, eventId: { type: "string", description: "Event ID", }, }, required: ["projectSlug", "eventId"], }, },
- src/index.ts:529-546 (registration)Tool registration in the listTools response, including name, description, and input schema.{ name: "sentry_get_event", description: "Retrieve a specific Sentry event from an issue. Requires issue ID/URL and event ID.", inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, eventId: { type: "string", description: "Event ID", }, }, required: ["projectSlug", "eventId"], }, },
- src/sentry-api-client.ts:76-78 (helper)SentryAPIClient.getEvent method, which makes the HTTP request to Sentry API to fetch the specific event data using the private request helper.async getEvent(projectSlug: string, eventId: string) { return this.request(`/projects/${this.org}/${projectSlug}/events/${eventId}/`); }