list_projects
Retrieve all accessible FeedbackBasket projects with summary statistics to analyze feedback and bug reports.
Instructions
List all FeedbackBasket projects accessible by your API key with summary statistics
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/client.ts:22-66 (handler)The primary handler function `listProjects()` in the `FeedbackBasketClient` class. It makes an API call to retrieve projects, processes statistics, handles empty results, formats a comprehensive markdown summary with project details, stats, and API key info, and returns structured content for MCP.
async listProjects(): Promise<{ content: Array<{ type: string; text: string }> }> { try { const response = await this.api.post<ProjectsResponse>('/projects', {}); const projects = response.data.projects; if (projects.length === 0) { return { content: [{ type: 'text', text: 'No projects found. Make sure your API key has access to projects in your FeedbackBasket dashboard.' }] }; } const projectList = projects.map(project => { const totalFeedback = project.stats.totalFeedback; const pendingCount = project.stats.byStatus.PENDING; const bugCount = project.stats.byCategory.BUG; return [ `**${project.name}**`, ` URL: ${project.url}`, ` Total Feedback: ${totalFeedback}`, ` Pending: ${pendingCount} | Bugs: ${bugCount}`, ` Created: ${new Date(project.createdAt).toLocaleDateString()}`, '' ].join('\n'); }).join('\n'); const summary = [ `# FeedbackBasket Projects (${projects.length} total)\n`, projectList, `\n*API Key: ${response.data.apiKeyInfo.name} (${response.data.apiKeyInfo.usageCount} uses)*` ].join('\n'); return { content: [{ type: 'text', text: summary }] }; } catch (error) { throw this.handleError('Failed to fetch projects', error); } } - src/index.ts:64-72 (registration)Tool registration in the `ListToolsRequest` handler, defining the tool name, description, and input schema (empty object, no parameters required).
{ name: 'list_projects', description: 'List all FeedbackBasket projects accessible by your API key with summary statistics', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, }, - src/index.ts:194-196 (registration)Dispatch logic in the `CallToolRequest` handler switch statement that routes 'list_projects' tool calls to the client handler.
case 'list_projects': return await client.listProjects(); - src/index.ts:67-71 (schema)Input schema definition for the 'list_projects' tool: an empty object indicating no input parameters are required.
inputSchema: { type: 'object', properties: {}, additionalProperties: false, },