get_bug_reports
Retrieve and filter bug reports from FeedbackBasket projects by status, severity, or search terms to identify and address software issues.
Instructions
Get bug reports specifically from your FeedbackBasket projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Filter by specific project ID | |
| status | No | Filter by bug status | |
| severity | No | Filter by computed severity (based on sentiment: negative=high, neutral=medium, positive=low) | |
| search | No | Search bug report content for specific text | |
| limit | No | Maximum number of results to return (default: 20, max: 100) | |
| includeNotes | No | Include internal notes in the response (default: false) |
Implementation Reference
- src/client.ts:141-212 (handler)The main handler function getBugReports that executes the tool logic. It calls the FeedbackBasket API '/feedback/bugs' endpoint with optional filters, handles empty results, formats bug reports with severity/status emojis, includes statistics summary, and structures the markdown-formatted output.async getBugReports(params: { projectId?: string; status?: 'PENDING' | 'REVIEWED' | 'DONE'; severity?: 'high' | 'medium' | 'low'; limit?: number; search?: string; includeNotes?: boolean; } = {}): Promise<{ content: Array<{ type: string; text: string }> }> { try { const response = await this.api.post<BugReportsResponse>('/feedback/bugs', { limit: 20, includeNotes: false, ...params, }); const bugReports = response.data.bugReports; if (bugReports.length === 0) { const filters = Object.entries(params) .filter(([_, value]) => value !== undefined) .map(([key, value]) => `${key}: ${value}`) .join(', '); return { content: [{ type: 'text', text: `No bug reports found${filters ? ` with filters: ${filters}` : ''}.` }] }; } const bugList = bugReports.map(bug => { const severityEmoji = bug.severity === 'high' ? 'π΄' : bug.severity === 'medium' ? 'π‘' : 'π’'; const statusEmoji = bug.status === 'PENDING' ? 'β³' : bug.status === 'REVIEWED' ? 'ποΈ' : 'β '; return [ `${severityEmoji} **${bug.severity.toUpperCase()} SEVERITY** ${statusEmoji} ${bug.status}`, `Project: ${bug.project.name}`, `Bug: ${bug.content.length > 150 ? bug.content.substring(0, 150) + '...' : bug.content}`, bug.email ? `Reported by: ${bug.email}` : '', bug.notes && params.includeNotes ? `Notes: ${bug.notes}` : '', `Reported: ${new Date(bug.createdAt).toLocaleDateString()}`, '' ].filter(Boolean).join('\n'); }).join('\n'); const stats = response.data.stats; const statsText = [ `## Bug Statistics`, `Total Bugs: ${stats.totalBugs}`, `π΄ High: ${stats.bySeverity.high} | π‘ Medium: ${stats.bySeverity.medium} | π’ Low: ${stats.bySeverity.low}`, `β³ Pending: ${stats.byStatus.pending} | ποΈ Reviewed: ${stats.byStatus.reviewed} | β Done: ${stats.byStatus.done}`, '' ].join('\n'); const summary = [ `# Bug Reports (${bugReports.length} of ${response.data.pagination.totalCount})\n`, statsText, bugList, response.data.pagination.hasMore ? `\n*Showing first ${bugReports.length} results. Use offset parameter to get more.*` : '', `\n*API Key: ${response.data.apiKeyInfo.name}*` ].join('\n'); return { content: [{ type: 'text', text: summary }] }; } catch (error) { throw this.handleError('Failed to fetch bug reports', error); } }
- src/index.ts:116-153 (schema)Input schema definition for the get_bug_reports tool, specifying optional parameters for filtering bug reports including projectId, status, severity, search, limit (1-100), and includeNotes.{ name: 'get_bug_reports', description: 'Get bug reports specifically from your FeedbackBasket projects', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Filter by specific project ID', }, status: { type: 'string', enum: ['PENDING', 'REVIEWED', 'DONE'], description: 'Filter by bug status', }, severity: { type: 'string', enum: ['high', 'medium', 'low'], description: 'Filter by computed severity (based on sentiment: negative=high, neutral=medium, positive=low)', }, search: { type: 'string', description: 'Search bug report content for specific text', }, limit: { type: 'number', description: 'Maximum number of results to return (default: 20, max: 100)', minimum: 1, maximum: 100, }, includeNotes: { type: 'boolean', description: 'Include internal notes in the response (default: false)', }, }, additionalProperties: false, }, },
- src/index.ts:200-202 (registration)Tool registration/dispatch in the CallToolRequest handler switch statement, which calls the client.getBugReports method with parsed arguments.case 'get_bug_reports': return await client.getBugReports(args || {});
- src/types.ts:94-126 (schema)TypeScript interface defining the structure of the API response for bug reports, used for type safety in the handler.export interface BugReportsResponse { bugReports: BugReport[]; stats: { totalBugs: number; bySeverity: { high: number; medium: number; low: number; }; byStatus: { pending: number; reviewed: number; done: number; }; }; pagination: { totalCount: number; limit: number; offset: number; hasMore: boolean; nextOffset: number | null; }; filters: { projectId?: string; status?: string; severity?: string; search?: string; }; apiKeyInfo: { name: string; usageCount: number; }; }