sentry_list_issues
Retrieve and list project issues from Sentry using a project slug and optional search query for targeted error monitoring and debugging.
Instructions
List issues for a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectSlug | Yes | Project slug/identifier | |
| query | No | Search query (e.g., 'is:unresolved', 'level:error') |
Implementation Reference
- src/index.ts:1019-1037 (handler)Handler case in the CallToolRequestSchema that executes the sentry_list_issues tool: checks for apiClient, extracts parameters, calls apiClient.listIssues(), and formats the response as text content listing up to 10 issues.case "sentry_list_issues": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { projectSlug, query } = args as any; const issues = await apiClient.listIssues(projectSlug, query); return { content: [ { type: "text", text: `Found ${issues.length} issues in ${projectSlug}:\n${issues.slice(0, 10).map((i: any) => `- [${i.level}] ${i.title} (${i.count} events)` ).join('\n')}${issues.length > 10 ? '\n... and more' : ''}`, }, ], }; }
- src/index.ts:397-413 (registration)Registration of the sentry_list_issues tool in the ListToolsRequestSchema response, defining its name, description, and input schema.{ name: "sentry_list_issues", description: "List issues for a project", inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, query: { type: "string", description: "Search query (e.g., 'is:unresolved', 'level:error')", }, }, required: ["projectSlug"], },
- src/index.ts:400-412 (schema)Input schema definition for the sentry_list_issues tool, specifying required projectSlug and optional query parameters.inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, query: { type: "string", description: "Search query (e.g., 'is:unresolved', 'level:error')", }, }, required: ["projectSlug"],
- src/sentry-api-client.ts:55-58 (helper)Core helper method in SentryAPIClient that constructs the API endpoint for listing issues and delegates to the private request method.async listIssues(projectSlug: string, query?: string) { const params = query ? `?query=${encodeURIComponent(query)}` : ''; return this.request(`/projects/${this.org}/${projectSlug}/issues/${params}`); }
- src/sentry-api-client.ts:20-36 (helper)Private request utility method used by listIssues to perform 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(); }