get_feedback
Retrieve and filter project feedback from FeedbackBasket by category, status, sentiment, or search terms to analyze bug reports, feature requests, and reviews.
Instructions
Get feedback from your FeedbackBasket projects with filtering options
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Filter by specific project ID | |
| category | No | Filter by feedback category | |
| status | No | Filter by feedback status | |
| sentiment | No | Filter by sentiment analysis result | |
| search | No | Search feedback 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:71-136 (handler)The primary handler function implementing the 'get_feedback' tool logic. It makes an authenticated API request to the FeedbackBasket '/feedback' endpoint with optional filters, formats the results into a structured markdown report including project info, categories, sentiments, and handles empty results or errors.async getFeedback(params: { projectId?: string; category?: 'BUG' | 'FEATURE' | 'REVIEW'; status?: 'PENDING' | 'REVIEWED' | 'DONE'; sentiment?: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL'; limit?: number; search?: string; includeNotes?: boolean; } = {}): Promise<{ content: Array<{ type: string; text: string }> }> { try { const response = await this.api.post<FeedbackResponse>('/feedback', { limit: 20, includeNotes: false, ...params, }); const feedback = response.data.feedback; if (feedback.length === 0) { const filters = Object.entries(params) .filter(([_, value]) => value !== undefined) .map(([key, value]) => `${key}: ${value}`) .join(', '); return { content: [{ type: 'text', text: `No feedback found${filters ? ` with filters: ${filters}` : ''}.` }] }; } const feedbackList = feedback.map(item => { const category = item.category || 'UNCATEGORIZED'; const sentiment = item.sentiment || 'UNKNOWN'; const confidenceText = item.categoryConfidence ? ` (${Math.round(item.categoryConfidence * 100)}% confidence)` : ''; return [ `**${category}${confidenceText} | ${sentiment} | ${item.status}**`, `Project: ${item.project.name}`, `Content: ${item.content.length > 100 ? item.content.substring(0, 100) + '...' : item.content}`, item.email ? `Email: ${item.email}` : '', item.notes && params.includeNotes ? `Notes: ${item.notes}` : '', `Created: ${new Date(item.createdAt).toLocaleDateString()}`, '' ].filter(Boolean).join('\n'); }).join('\n'); const summary = [ `# Feedback Results (${feedback.length} of ${response.data.pagination.totalCount})\n`, feedbackList, response.data.pagination.hasMore ? `\n*Showing first ${feedback.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 feedback', error); } }
- src/index.ts:74-115 (registration)Tool registration in the MCP ListTools response, defining the 'get_feedback' tool's name, description, and complete input schema for validation.name: 'get_feedback', description: 'Get feedback from your FeedbackBasket projects with filtering options', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Filter by specific project ID', }, category: { type: 'string', enum: ['BUG', 'FEATURE', 'REVIEW'], description: 'Filter by feedback category', }, status: { type: 'string', enum: ['PENDING', 'REVIEWED', 'DONE'], description: 'Filter by feedback status', }, sentiment: { type: 'string', enum: ['POSITIVE', 'NEGATIVE', 'NEUTRAL'], description: 'Filter by sentiment analysis result', }, search: { type: 'string', description: 'Search feedback 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:197-198 (handler)MCP server handler for CallToolRequest that delegates 'get_feedback' calls to the FeedbackBasketClient.getFeedback method.case 'get_feedback': return await client.getFeedback(args || {});
- src/types.ts:72-92 (helper)Type definitions used by the getFeedback handler for typing the API response, including feedback items, pagination, and filters.export interface FeedbackResponse { feedback: Feedback[]; pagination: { totalCount: number; limit: number; offset: number; hasMore: boolean; nextOffset: number | null; }; filters: { projectId?: string; category?: string; status?: string; sentiment?: string; search?: string; }; apiKeyInfo: { name: string; usageCount: number; }; }