sentry_list_error_events_in_project
List recent error events from a Sentry project to monitor frequency patterns and occurrence timestamps for debugging.
Instructions
List error events from a specific Sentry project. View recent errors, frequency patterns and occurrence timestamps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectSlug | Yes | Project slug/identifier | |
| limit | No | Number of events to return | |
| query | No | Search query |
Implementation Reference
- src/index.ts:1189-1206 (handler)MCP tool handler that extracts parameters, calls SentryAPIClient.listErrorEventsInProject, and formats the response as text content listing error events.
case "sentry_list_error_events_in_project": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { projectSlug, limit = 50, query } = args as any; const events = await apiClient.listErrorEventsInProject(projectSlug, { limit, query }); return { content: [ { type: "text", text: `Found ${events.length} error events in project ${projectSlug}:\n` + events.map((e: any) => `- ${e.title} (${e.eventID}) - ${e.dateCreated}`).join('\n'), }, ], }; } - src/index.ts:548-569 (schema)Tool schema definition including name, description, and input schema with projectSlug required, optional limit and query.
name: "sentry_list_error_events_in_project", description: "List error events from a specific Sentry project. View recent errors, frequency patterns and occurrence timestamps.", inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, limit: { type: "number", description: "Number of events to return", default: 50, }, query: { type: "string", description: "Search query", }, }, required: ["projectSlug"], }, }, - src/sentry-api-client.ts:195-198 (helper)Core implementation in SentryAPIClient that constructs and sends HTTP request to Sentry API endpoint for project events using the provided parameters.
async listErrorEventsInProject(projectSlug: string, params?: any) { const queryParams = params ? '?' + new URLSearchParams(params).toString() : ''; return this.request(`/projects/${this.org}/${projectSlug}/events/${queryParams}`); }