sentry_get_event
Retrieve a specific Sentry event from an issue using project slug and event ID for detailed error analysis and debugging.
Instructions
Retrieve a specific Sentry event from an issue. Requires issue ID/URL and event ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectSlug | Yes | Project slug/identifier | |
| eventId | Yes | Event ID |
Implementation Reference
- src/index.ts:1165-1187 (handler)The main handler for the 'sentry_get_event' tool. It validates the apiClient, extracts parameters, calls apiClient.getEvent(projectSlug, eventId), and returns a formatted text response with event details.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)The tool definition including name, description, and input schema (JSON Schema for parameters: projectSlug and eventId). This is part of the tools array registered with the MCP server.{ 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)The helper method in SentryAPIClient that performs the actual API request to fetch the event from Sentry's REST API.async getEvent(projectSlug: string, eventId: string) { return this.request(`/projects/${this.org}/${projectSlug}/events/${eventId}/`); }
- src/index.ts:690-690 (registration)The registration of all tools including 'sentry_get_event' via server.setTools(tools), where tools array contains the schema entry.};