sentry_list_issue_events
Retrieve and analyze events linked to a specific Sentry issue to examine details, metadata, and patterns for troubleshooting and performance insights.
Instructions
List events for a specific Sentry issue. Analyze event details, metadata and patterns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | Issue ID | |
| limit | No | Number of events to return |
Implementation Reference
- src/index.ts:1231-1250 (handler)The MCP CallTool handler case for 'sentry_list_issue_events'. Checks for API client, extracts issueId and optional limit, fetches events using apiClient.listIssueEvents, and returns a formatted text response listing the events.case "sentry_list_issue_events": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { issueId, limit = 50 } = args as any; const events = await apiClient.listIssueEvents(issueId); return { content: [ { type: "text", text: `Found ${events.length} events for issue ${issueId}:\n` + events.slice(0, limit).map((e: any) => `- ${e.eventID} - ${e.dateCreated} - ${e.message || e.title}` ).join('\n'), }, ], }; }
- src/index.ts:597-614 (schema)The tool schema definition, including name, description, and inputSchema with required 'issueId' and optional 'limit'. This is returned in the ListTools response, effectively registering the tool.name: "sentry_list_issue_events", description: "List events for a specific Sentry issue. Analyze event details, metadata and patterns.", inputSchema: { type: "object", properties: { issueId: { type: "string", description: "Issue ID", }, limit: { type: "number", description: "Number of events to return", default: 50, }, }, required: ["issueId"], }, },
- src/sentry-api-client.ts:172-174 (helper)Core helper method in SentryAPIClient that performs the HTTP GET request to the Sentry API endpoint `/issues/{issueId}/events/` to retrieve the list of events for the issue.async listIssueEvents(issueId: string) { return this.request(`/issues/${issueId}/events/`); }
- src/sentry-api-client.ts:20-36 (helper)Private request method used by all API calls, including listIssueEvents, to make authenticated fetch requests to the Sentry API.private async request(endpoint: string, options: any = {}) { const url = `${this.baseUrl}${endpoint}`; const response = await fetch(url, { ...options, headers: { 'Authorization': `Bearer ${this.authToken}`, 'Content-Type': 'application/json', ...options.headers, }, }); if (!response.ok) { throw new Error(`Sentry API error: ${response.status} ${response.statusText}`); } return response.json(); }